in reply to how to get HTML file after parsing with HTML::Normalize

I suspect your problem is the $dirty = <IN>; line which only reads a single line from the input file. There are many ways to fix that, but the technique I tend to use is:

my $dirty = do {local $/; <IN>};

which resets the line end terminator ($/) so that the diamond operator (<>)reads the whole file in one hit.


Perl is environmentally friendly - it saves trees