in reply to Use of uninitialized value in string eq

My code doesn't have 226 lines, so I'm not sure what document is being referenced by the first error message.
As the warning message states, the warning is coming from line 226 of file C:/Dwimperl/perl/site/lib/Mojo/DOM.pm, not the code you posted. Mojo::DOM on CPAN has more than 26 lines.

Replies are listed 'Best First'.
Re^2: Use of uninitialized value in string eq
by Anonymous Monk on Sep 10, 2014 at 15:57 UTC

    Thank you for your response. Line 226 of the referenced file is:

    $_->[1] eq 'pre' and $trim = 0 for $self->_ancestors, $tree;

    I have no idea what this means or how it relates to my code. Any wisdom would be appreciated.

      In your code, you declared $fh, but you should check the status of the open to make sure it is defined (Tip #7 from the Basic debugging checklist).

        Good call. I inserted the "or die 'Can't open...$!'" command after the open command to get feedback on the error. Now running the code produces the error message: "Can't use string ("1000694-R201203014-C20111231-F10-"...) as a symbol ref while "strict refs" in use at Six_gramsC.pl line 20. That long numeric string is one of the file names I"m running through the batch (and representative of the other file names). Is there something inherently wrong with this filename, or is the program reading the file name where I'm trying to get it to read the file contents?