in reply to Re: Strings mangled on printing
in thread Strings mangled on printing
$rt = $inp; chomp $rt; # insert at line 23 $rt =~ s/Remote Temp://;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Strings mangled on printing
by roboticus (Chancellor) on Jun 03, 2015 at 22:47 UTC |