good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Slurping file into array VS Process file line-by-lineby monkfan (Curate) |
on Oct 27, 2004 at 07:15 UTC ( [id://402915]=perlquestion: print w/replies, xml ) | Need Help?? |
monkfan has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, I have a question, that may seem trivial to you, I hope you don't mind to look at it. This is about treating file from input argument. I wonder: 1. When we should choose to slurp a file into array and processing it, (see Example 1) or 2. Processing it line by line (see Example 2). 3. What are the pro and cons of using either technique. Example 1: Example 2:
Regards, Edward
Back to
Seekers of Perl Wisdom
|
|