in reply to Improvement suggestions?

In addition to checking open for errors, you should check new HTML::Clean(...) for errors. It's not well documented, but HTML::Clean's new will return undef if it has trouble opening the file you pass to it. (E.g. a "permission denied".)
my $h = new HTML::Clean($filename,9) or die "Couldn't load $filename: +$!\n";