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


in reply to Re^2: On bad habits
in thread On bad habits

But just to clarify, the biggest problem with that code fragment is not that it's lengthy, but that it discards the last line of the file when it does not end in a $/.

the lowliest monk

Replies are listed 'Best First'.
Re^4: On bad habits
by Nkuvu (Priest) on Jun 21, 2005 at 17:50 UTC
    Exactly. And this is something that I never realized until someone pointed it out to me (just never really thought about it). I was fortunate enough to never have this bite me, and got out of the habit of the fragment before it did actually cause problems.