foo(\@fruit,\@drinks); sub foo { my ($fruit,$drinks) = @_; print $fruit->[0], "\n"; print $drinks->[0], "\n"; }