Think about Loose Coupling | |
PerlMonks |
HTML::HTML5::Parser weirdnessby djh (Novice) |
on Feb 23, 2020 at 16:06 UTC ( [id://11113347]=perlquestion: print w/replies, xml ) | Need Help?? |
djh has asked for the wisdom of the Perl Monks concerning the following question: I'm trying to use HTML::HTML5::Parser to parse some HTML pages I stored in files. My program seems to work just fine except with one file and I'm baffled as to what's happening. My program sits in a loop processing files from a list. I've added debugging so it prints the name of the file and then a dump of the document as parsed and then it goes on to process the document except in this one case. So the relevant bit of code is:
and the output for the problematic file is:
Now I've checked the contents of that file and it actually starts (just like all the others):
I can't figure out where that strange alleged file contents is coming from or why it affects just that file. In particular the weird <head/> and <body/> tags. I've searched for those strings in my home directory and in /usr/lib/perl5 and done a web search but haven't found anything. So I'd be very grateful if anybody has any ideas on techniques to figure out what the problem is, or happens to recognize it :)
Back to
Seekers of Perl Wisdom
|
|