#!perl use strict; use warnings; sub test ($\@\@) { my $number = shift; my @array1 = @{+shift}; # Shift off the reference, and dereference it my @array2 = @{+shift}; # Print the variable contents print $number . $/ . join(' - ', @array1) . $/ . join(' - ', @array2) . $/; } my @a = qw(mary had a little lamb !); my @b = qw(London Bridge is); test (2, @a, @b); __END__ OUTPUT: 2 mary - had - a - little - lamb - ! London - Bridge - is