$html =~ s/\n/
\n/g; # assume this, and then fix
in pre blocks with..... $html =~ s{
(.*?)
} { local $_=$1; s/
//g; $_ }gse; print $html;