##
. . .
use open qw/:std :utf8/;
. . .
my $xhtml = HTML::TreeBuilder::XPath->new;
$xhtml->implicit_tags(1);
my $filehandle;
open ($filehandle, "<", $file)
or die("Could not open file '$file' : error: $!\n");
$xhtml->parse_file($filehandle)
or die("Could not parse file handle for '$file' : $!\n");