in reply to Perl Tutorial code uses "qw" but has an error when run
Your error is not in the use of qw// but in the use of for. The list over which for iterates must be in brackets. See:
$ perl -E 'for my $d qw( 2006-10-21 15.01.2007 10/31/2005 ) { say $d; +}' syntax error at -e line 1, near "$d qw( 2006-10-21 15.01.2007 10/31/20 +05 )" Execution of -e aborted due to compilation errors. $ perl -E 'for my $d (qw( 2006-10-21 15.01.2007 10/31/2005 )) { say $d +; }' 2006-10-21 15.01.2007 10/31/2005
|
|---|