thrashbarg has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if anyone can clarify the syntax for the loop used in this code? I understand what the code does but am unsure as to why/how. I have never seen a for loop like this before.@e = (1,2,3,4); my $foo; $foo += $_ for @e;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: For Syntax Question
by pg (Canon) on Jul 19, 2004 at 16:39 UTC | |
|
Re: For Syntax Question
by hardburn (Abbot) on Jul 19, 2004 at 16:40 UTC | |
|
Re: For Syntax Question
by borisz (Canon) on Jul 19, 2004 at 16:40 UTC | |
|
Re: For Syntax Question
by Limbic~Region (Chancellor) on Jul 19, 2004 at 16:43 UTC | |
|
Re: For Syntax Question
by pbeckingham (Parson) on Jul 19, 2004 at 17:29 UTC |