use strict; use warnings; my @a1 = qw(keats byron frost); my @a2 = qw(marlowe shakespeare jonson); handle_two( \@a1, \@a2 ); exit(0); sub handle_two { my ($aref1, $aref2) = @_; for my $aref ($aref1, $aref2) { do_something_with_one( $aref ); } return; } sub do_something_with_one { my ($aref) = @_; printf "%s\n", join q(, ), @$aref; return; } __END__