http://www.perlmonks.org?node_id=1178224


in reply to passing parameters from shell script to perl program doesn't preserve spaces [solved]

This works, at least in bash:

$ args=(one "two three" four "five six") $ perl -e 'for (@ARGV) {print "$_\n"}' "${args[@]}" one two three four five six