open(my $fh, "<:encoding($CEF)", $qfn) or die; while (<$fh>) { print("Line $. contains EM DASH\n") if /\x{2014}/; }