in reply to Why is "for" much slower than "while"?
for reads in the entire file, building a list of lines and then iterates over that list. while reads the file one line at a time.
Update: Links fixed. Thanks toolic.
In Section
Seekers of Perl Wisdom