P is for Practical | |
PerlMonks |
Re^3: Printing a String (TOO stupid?)by RonW (Parson) |
on Jun 18, 2014 at 16:12 UTC ( [id://1090319]=note: print w/replies, xml ) | Need Help?? |
Updated I was wrong. Somehow, I remembered it working differently. But { local $/ = ''; chomp($x); } seems to work. Needs more testing and I'm not sure there would still be a performance benefit. Try chomp; chomp; instead of chop; chop; chomp is conditional. Being built in, I would expect it to be more efficient than a regex.
In Section
Seekers of Perl Wisdom
|
|