Oddities in the for notation abound... The following is valid perl
foreach my $foo qw(bar baz) { print $foo,$/ }
:-)
• Update:
*Sigh* apparently people have missed the point here. The qw is special cased so you dont have to write
foreach my $foo (qw(bar baz)) { }
Foo on you people who thought I was being sarcastic!
In reply to Re: Surpised by foreach iterator limitation
by demerphq
in thread Surpised by foreach iterator limitation
by shotgunefx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |