http://www.perlmonks.org?node_id=488984


in reply to Re: Perl Best Practices book: is this one a best practice or a dodgy practice?
in thread Perl Best Practices book: is this one a best practice or a dodgy practice?

The only reason to read the original file line by line would be that it's very large...
Surely not the "only" reason. Here are five other possible reasons, just off the top of my head. You might use a line-by-line approach: Note that I don't disagree with you that using temporary files is safer in general, if you can afford the costs involved. After all, using temporary files is precisely what IO::Insitu does. I only question your argument that its possible to deduce the necessity for temporary files from the particular I/O characteristics of the original example (or from any piece of undocumented code for that matter).
  • Comment on Re^2: Perl Best Practices book: is this one a best practice or a dodgy practice?