# A simple scenario printing a named array: $ perl -e 'my @x = qw{a bcd ef}; print "@x\n"' a bcd ef $ perl -e 'my @x = qw{a bcd ef}; { local $, = ","; print @x, "\n" }' a,bcd,ef, # Oops! Bogus comma at the end. Better split the print list. $ perl -e 'my @x = qw{a bcd ef}; { local $, = ","; print @x; print "\n" }' a,bcd,ef # A more complex scenario printing an expression which evaluates to a list: $ perl -e 'print "@{[f()]}\n"; sub f { qw{a bcd ef} }' a bcd ef $ perl -e '{ local $, = ","; print f(), "\n"; } sub f { qw{a bcd ef} }' a,bcd,ef, # Oops! Bogus comma at the end. Better split the print list. $ perl -e '{ local $, = ","; print f(); print "\n"; } sub f { qw{a bcd ef} }' a,bcd,ef