The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!perl -w
use strict;
use Ruby -all;
use threads;

sub thr{
	my $i = 0;
	for(1 .. 10){
		Thread->new(sub{
			puts $i;
		});
	}
}

my @thr;
for(1 .. 5){
	push @thr, threads->new(\&thr);
}

for(reverse @thr){
	$_->join();
}