Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Different behaviors between "while" and "map"by Joost (Canon) |
on Dec 06, 2008 at 00:43 UTC ( [id://728442]=note: print w/replies, xml ) | Need Help?? |
Just to expand a little on this: map, grep, foreach and most while constructs all work on perl's concept of lists.
is special. it does not act like any other iteration construct, not even like any other while() construct. It explicitly iterates over each record ("line") one by one instead of converting the whole file to a list first.
In Section
Seekers of Perl Wisdom
|
|