Subject: | forks.pm's join subroutine does not return in array context |
forks.pm's join subroutine does not return values in an array context.
The array is forced to a scalar value (ie. the number of elements in the
array).
Please see attached example for more details.
Subject: | forks.pl |
#! /usr/bin/perl
use Data::Dumper;
use forks;
sub foo {
return (1, 2, 3, 4, 5);
}
MAIN: {
my $thr = threads->create('foo');
my @res = $thr->join;
print "Results: " . Dumper(\@res);
}