powerman has asked for the wisdom of the Perl Monks concerning the following question:
It return "2" instead of ("Fifty-six", "foo", 2) - looks like thread is executed in scalar context.use threads; $thr = threads->new(\&sub1); @ReturnData = $thr->join; print "Thread returned @ReturnData"; sub sub1 { return("Fifty-six", "foo", 2); }
So, is this a bug in join(), or just broken example?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: threads->join
by liz (Monsignor) on Oct 05, 2003 at 21:52 UTC | |
by powerman (Friar) on Oct 05, 2003 at 22:53 UTC |