Re: [Parseperl-discuss] How should "for qw<blah> {}" parse?
Brought to you by:
adamkennedy
From: Elliot S. <pe...@ga...> - 2008-07-10 03:44:18
|
Chris Dolan wrote: > Elliot, > Are you sure that's valid syntax? I don't think it's legal to omit the > parens. Perfectly valid. Guy at work was running into a RequireFinalReturn violation because he used that form, even though he had a perfectly good return statement. Well, not strictly so. The form in the subject results in a "Missing $ on loop variable". However, if you declare the loop variable like so: perl -e 'foreach my $blah qw<blah blah> { print "$blah\n" }' it works. No parens anywhere. Try it. |