use strict; use warnings; my @perls = (1, 2, 3, 4); sub foo { my @foo = @{shift}; return join $/, @foo } print foo(\@perls)