The stupid question is the question not asked | |
PerlMonks |
Re^2: Strings mangled on printingby atcroft (Abbot) |
on Jun 03, 2015 at 18:12 UTC ( [id://1128984]=note: print w/replies, xml ) | Need Help?? |
chomp() would probably be more appropriate, since it removes (from the docs) "any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the 'English' module)", and $/ can be set to the appropriate value if there is a difference in line endings/separators (such as "\n" vs. "\r" vs "\r\n" vs. ...). Hope that helps.
In Section
Seekers of Perl Wisdom
|
|