Help for this page
read IN, my $html, -s $file; # your code my $file = do{ local $/; <IN> }; # The way I usually use.