http://www.perlmonks.org?node_id=11105603


in reply to Re^4: Match text from txt to html
in thread Match text from txt to html

When open fails, get it to tell you why:

open(my $fh, '<', $html) or die "cannot open file $html: $!";

Trying to parse HTML like this is more often than not a waste of time.