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