in reply to Creating an Intermediate Perl Programming Curriculum
# foreach vs. for
Err, and the fact that they are exactly the same, just easier to read, depending on context. For example, these just don't flow through the brain as comfortably:
foreach (my $i=0; $i<10; $i++) { print "$i\n"; } for my $i (0..9) { print "$i\n"; }
But I know what you mean :)
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating an Intermediate Perl Programming Curriculum
by Steve_p (Priest) on May 04, 2004 at 14:03 UTC | |
by revdiablo (Prior) on May 04, 2004 at 16:31 UTC |