in reply to Parsing lines containing extra carriage returns
The above will replace chomp as well.while <FILE> { tr/\r\n//d; # etc.
If you have blank lines (two consecutive newlines), you can just detect them after the tr:
tr/\r\n//d; next if $_ eq '';
|
|---|