sub foo ($$) { print join " / ", map "'$_'", @_; } my @x = qw(a b); foo(@x);