my @array1 = qw (one two three); my @array2 = qw (four five six); doprint(@array1,@array2); sub doprint { for (@_) { print "$_\n"; } }