in reply to parameters

Yes, always pass an array as a reference when passing multiple arguments to a subroutine.

You de-reference the array in the sub like so:

my ($var,$rlist) = @_; # de-reference $rlist like so: @{$rlist} - but, TIMTOWTDI ;) foreach(@{$rlist}) { #do stuff }
UPDATE:
Almost forgot about this one:
my $var = shift; my @list = @{+shift}; # you cannot use @{shift}, the + operator tricks perl # into getting the value of shift first

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)