in reply to Subroutine Return Problem

There's also short-cut for passing arrays to and from subs that you may come across. Consider the following example:

sub print_lengths { print scalar @$_, "\n" for @_; } my @a = qw( a b c d ); my @b = 1..8; my @c = localtime; print_lengths \( @a, @b, @c ); # notice the \ before the ( __END__ 4 8 9
I.e. \( @a, @b, @c ) is equivalent to ( \@a, \@b, \@c ). The \( ... ) evaluates to a list of references to the variables mentioned within the parentheses, as long as these are more than one. (I.e. \( @foo ) doesn't evaluate to \@foo; see perlref for more details.)

the lowliest monk