my ($thr) = threads->new( sub { return (1,2,3) }); my @a = $thr->join(); print "return is @a\n";