On Apr 14, Jeff 'japhy' Pinyan said:
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.
As I suspected, the module only overrides "" and boolean context explicitly, and doesn't set up a "fallback".
I'm contacting the author.
-- 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>