Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: HTML::HTML5::Parser weirdness

by djh (Novice)
on Feb 23, 2020 at 20:34 UTC ( [id://11113350]=note: print w/replies, xml ) Need Help??


in reply to Re: HTML::HTML5::Parser weirdness
in thread HTML::HTML5::Parser weirdness

Thanks for reading my post and taking the trouble to reply.

I did show you exactly how I populated $filename of course:

for my $filename (@files)

but I expect you meant how I populated @files, which was using readdir

opendir my $dir, $BASE_DIR or die "Cannot open $BASE_DIR directory: $! +"; my @all_files = readdir $dir; closedir $dir; my @files = sort grep { $_ =~ /\-00:/ } @all_files;

I didn't think that was important, since I specifically said I'd checked the file existed and I even posted some of its contents. And the fact that the loop works for all the other files in that directory is a strong hint there's no whitespace problems or whatever.

But the fact that you got a similar error with a non-existent file suggests to me that the problem is in the module, which was why I looked for <head/> in /usr/lib/perl5. So I'll go and look further to see if I can isolate where that string is coming from.

While I appreciate the benefits of SSCCE, I think the effort I would need to construct one in this case outweighs the benefits. But I may do so if I'm still stuck after a while.

PS Why does perlmonks format code at column 70? I could vaguely understand column 72 if I was a punched-card FORTRAN programmer but I use an 80-column terminal and try to stay within that!

Replies are listed 'Best First'.
Re^3: HTML::HTML5::Parser weirdness
by GrandFather (Saint) on Feb 23, 2020 at 21:30 UTC
    While I appreciate the benefits of SSCCE, I think the effort I would need to construct one in this case outweighs the benefits.

    Because very often the process of creating a SSCCE will find the problem for you. In the process of creating a SSCCE you are forced to examine your assumptions. Often you will find they aren't correct. You also make it easy for us to reproduce your problem - why should we do all the work? See I know what I mean. Why don't you?.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
Re^3: HTML::HTML5::Parser weirdness
by choroba (Cardinal) on Feb 23, 2020 at 20:44 UTC
    > Why does perlmonks format code at column 70?

    You can configure that in the Display Settings.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Ah, thanks! :) 70 still seems a strange default, but there's plenty of bigger things to worry about :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113350]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-23 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found