On Apr 13, Anish Kumar K said:

The code gives strange error

$subject = I get some value from the function

Yes, and it's an object of class XML::LibXML::NodeList that doesn't have an 'eq' operator overloaded for it. Contact the author of the module, or try this work-around:


  if ("$subject" eq '' or not defined $subject) { ... }

And I would do those tests in the other order:

  if (not defined $subject or "$subject" eq '') { ... }

Assuming the object CAN be string-ified, then putting it quotes will help you to work around the problem.

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to