#194913
use threads; my $var = "works"; my $thr = thread->new(\&sub1); $thr->detach; sub sub1 { print $var; }