I like named params
More examples heremysub({ a1 => \@array1, a2 => \@array2 }); sub mysub{ my ( $argref ) = @_; # brackets matter # ref to @array1 is @{ $argref->{a1} } # ref to @array2 is @{ $argref->{a2} }
Neil Watson
watson-wilson.ca
In reply to Re: Pass Arrays to a subroutine
by neilwatson
in thread Pass Arrays to a subroutine
by sankoshy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |