Look up the function chomp. It will do what you want.
Actually it won't:
$textarea = "Line1\015\012Line3\015\012Line3\015\012"; chomp $textarea; print $textarea.'----'; print "\n"; $textarea =~ s/[\015\012]/ /g; print $textarea;
It is better to specifically target CR and LF using their octal or hex escapes, thus the \015\012 instead of \r\n
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: DOS characters
by tachyon
in thread DOS characters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |