1 2 3 4 5 6 7
use threads; my $thr = threads->create(\&sub1); sub sub1 { print("In the thread\n"); } $thr->join; print "Finished\n";