Almost forgot. I wrote this simple dos_chomp function for cases where there may or may not be a CR (^M) before the LF. Enjoy!
sub dos_chomp { if (!defined(@_[0])) { chomp; s/\r$//; } else { for (@_) { chomp; s/\r$//; } } return wantarray ? @_ : @_[0]; }
In reply to Re: Re: Re: Re: Removing the ^M character, but also removing the newline
by steves
in thread Removing the ^M character, but also removing the newline
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |