sub foo { my $array = @_; foreach ($array) { print "$_\n"; } }