P is for Practical | |
PerlMonks |
Re: foreach questionby OM_Zen (Scribe) |
on Feb 25, 2003 at 03:24 UTC ( [id://238343]=note: print w/replies, xml ) | Need Help?? |
Hi , The script with a while to read is :
The line that shows is just the first one after closing the contents at the start of the loop The script with the foreach to read is :
The line that shows is all in the data , even if one closes the file at the start of the foreach , cause the contents are first stored in an anonymous array and then read from that array and hence the foreach is not that one uses to read large chunk of data
In Section
Seekers of Perl Wisdom
|
|