#! perl -slw use strict; use threads; use Time::HiRes qw[ time ]; sub simplesub { sleep 10, return 1 } my $start = time; my @threads = map{ threads->create( \&simplesub ) } 1 .. 10; my @array = 0 .. 1e5; my %hash = 1 .. 1e5; system qq[tasklist /fi "pid eq $$"]; printf "Taken %f seconds", time() - $start; $_->join for @threads;