Don't ask to ask, just ask | |
PerlMonks |
Re^2: reading file into an arrayby johngg (Canon) |
on Dec 05, 2008 at 22:16 UTC ( [id://728402]=note: print w/replies, xml ) | Need Help?? |
Processing line by line in a while loop is a a more scaleable solution but I would prefer to separate the line skipping part from the main line processing logic. I think it keeps things clearer but others may disagree.
Calling the scalar $discard makes it clear that it is something we are not interested in whereas $line might be something we want to work with. I hope you find these thoughts of interest. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|