$ perl -Mstrict -Mwarnings -E ' > my @arr = qw{ abc #def ghi };' Possible attempt to put comments in qw() list at -e line 2. $ perl -Mstrict -Mwarnings -Mdiagnostics -E ' my @arr = qw{ abc #def ghi };' Possible attempt to put comments in qw() list at -e line 2 (#1) (W qw) qw() lists contain items separated by whitespace; as with literal strings, comment characters are not ignored, but are instead treated as literal data. (You may have used different delimiters than the parentheses shown here; braces are also frequently used.) You probably wrote something like this: @list = qw( a # a comment b # another comment ); when you should have written this: @list = qw( a b ); If you really want comments, build your list the old-fashioned way, with quotes and commas: @list = ( 'a', # a comment 'b', # another comment ); $