in reply to Printing a String (TOO stupid?)
orchomp $line; $line =~ s/\r//g;
Update: Corrected two typos (a silly colon before the g regex modifier and a missing /) in the second regex. Thanks to poj for having pointed out them to me.$line =~ s/[\r\n]//g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Printing a String (TOO stupid?)
by AnomalousMonk (Archbishop) on Jun 19, 2014 at 09:43 UTC | |
by Laurent_R (Canon) on Jun 19, 2014 at 18:00 UTC |