![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re^2: Safely reading line by lineby moritz (Cardinal) |
on Jun 27, 2007 at 12:38 UTC ( #623606=note: print w/replies, xml ) | Need Help?? |
Your post was helpful indeed, but there is a thing to consider (and the reason for me to propose crashing the interpreter ;-)
If you read data line by line, that's usually because you need it line by line. Depending on your application it might be possible to handle incomplete lines without much change to your program, or it might not. If there is a good reason for line based reading, and the line doesn't fit into RAM, you're lost anyway. (Not always, but still rather often). On the other hand if the line based reading is just a method of chunking the data, then the approach that uses a read limit is probably the way to go.
In Section
Seekers of Perl Wisdom
|
|