New(?) for qw(...) error

Paul Makepeace paulm at paulm.com
Tue Mar 27 11:10:57 BST 2007


I've just had one of my dodgier scripts start bailing on this construction,

$ perl -le 'for $a qw(a b) { print $a }'
a
b
$ perl -le 'for qw(a b) { print }'
Missing $ on loop variable at -e line 1.

This is on 5.8.8; not sure when this kicked in.

P


More information about the london.pm mailing list