This: my $thr = threads->new(\sub1);
should be my $thr = threads->new(\&sub1);
If you had warnings enabled, you'd've got: Thread 1 terminated abnormally: Not a CODE reference at ...
In reply to Re: ithreads not behaving as expected
by BrowserUk
in thread ithreads not behaving as expected
by madorb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |