$ perl -we 'print "$_\n" for qw{ a b c };' a b c $ perl -we 'for qw{ a b c } { print "$_\n"; }' Missing $ on loop variable at -e line 1. $ perl -we 'for (qw{ a b c }) { print "$_\n"; }' a b c