#! perl -slw use strict; use threads ( stack_size => 4096 ); use threads::shared; use LWP::Simple; use Time::HiRes qw[ time sleep ]; our $T ||= 200; my $url = ### your url (of the actual file!) here ###; my $running :shared = 0; my $start = time; for( 1 .. $T ) { async( sub{ { lock $running; ++$running }; sleep 0.001 while $running < $T; my $id = shift; getstore( $url, qq[c:/test/dl.t.$id] ); --$running; }, $_ )->detach; } sleep 1 while $running; printf "Took %.3f seconds\n", time() - $start;