perl -e '@a = qw (a bc def); print "before: @a\n"; $"=q; print "after: @a\n";' Output: before: a bc def