Thank you, again, Tux. I genuinely appreciate the tips. I'll brush up on auto_diag.
The BOM is a nuisance, especially in CSV files. In one of my real programs that uses Text::CSV_XS (what I posted here is a reduction that simply demonstrates a specific problem I was having), I'm stymied by the confluence of byte order marks in UTF-8 files that force me to use File::BOM and, unfortunately, some malformed UTF-8 text in the data that kills CSV parsing with this unforgiving error message:
utf8 "\xEC" does not map to Unicode at C:/strawberry/perl/lib/Encode.p
+m line 176.
I don't know how to tell Text::CSV_XS or File::BOM to tell Encode to lighten up already about one or two bogus characters! :-(