http://www.perlmonks.org?node_id=63934


in reply to List context or not?

Since foo() returns a list, why not assign it to a list:
my @bar=foo(); print "@bar\n";
To get the number of keys returned by foo(), it'd be:
my $baz=scalar(@bar);
(Update: the "wantarray" answers are probably better, I'm a young grasshopper learning, blah blah blah. :o)

--
Me spell chucker work grate. Need grandma chicken.