in reply to $threads->join() only returns one argument??? BUG?

How about return an ARRAY ref?

use threads; my $t = threads->create( sub{ sleep 3; return([qw(a b c)]) ; } ); my $ret = ($t->join) ; print ">> @$ret\n" ;
But you have pointed an interesting point, since it should return all the list! I never come to this problem, that is a bug, or at least not documented!

Have you posted this to PerlBug? http://rt.perl.org/perlbug/

Graciliano M. P.
"The creativity is the expression of the liberty".

Replies are listed 'Best First'.
Re: Re: $threads->join() only returns one argument??? BUG?
by rr (Sexton) on Jun 12, 2003 at 13:30 UTC

    Hello,

    I did work around this by returning a ref to an array, but it definatly should work as documented.

    I see from a post above that the behaivior is docoumented somewhere and I'll dig it up.

    Thanks for the pointer to perlbug, I'll post something there.

    Again, thanks to all of your for your responses!

    rr