in reply to Surpised by foreach iterator limitation
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Re: Surpised by foreach iterator limitation
by merlyn (Sage) on Apr 09, 2003 at 15:47 UTC | |
|
qw// is special!
by Mr. Muskrat (Canon) on Apr 09, 2003 at 15:28 UTC | |
|
Re: Re: Surpised by foreach iterator limitation
by Mr. Muskrat (Canon) on Apr 08, 2003 at 21:01 UTC | |
|
Re: Re: Surpised by foreach iterator limitation
by shotgunefx (Parson) on Apr 08, 2003 at 20:53 UTC |