in reply to arrays passed into subroutines

The arrays get flattened into one long list. @_ pours it into the first place looking for a list i.e. @Values.

You can pass the arrays as array references e.g. \@array.

In the subroutine you then need to dereference them, say,

my $array_ref = shift; my @array = @{$array_ref};
The perlreftut is a good place to delve deeper into refs.

Replies are listed 'Best First'.
Re^2: arrays passed into subroutines
by amadain (Novice) on Nov 10, 2004 at 09:15 UTC
    Thanks. The array references worked fine