in reply to Re: Pass Arrays to a subroutine
in thread Pass Arrays to a subroutine

I always used to accept my params within a hashref, but in the last year or so, I've changed to just using a straight up hash instead. I feel it makes the interface a tiny bit cleaner:

mysub(a => \@array1, b => \@array2); sub mysub { my %params = @_; print "$_\n" for @{ $params{a} }; }