in reply to Re: DOS characters
in thread DOS characters
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DOS characters
by shotgunefx (Parson) on Sep 06, 2001 at 03:38 UTC |