in reply to Perl Regex to Fix line feed issue
Or you might use: $text =~ s/\r+/\r/g; if there could be multiple adjacent blank lines.use File::Slurp; my $text = read_file('filename'); $text =~ s/\r\r/\r/g; print $text;
Knowing exactly the structure of the file would help. What does od -c filename print out near those blank lines?
|
|---|