Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Use of uninitialized value in string comparison (cmp)

by pajout (Curate)
on Mar 19, 2010 at 09:30 UTC ( #829580=note: print w/replies, xml ) Need Help??

in reply to Use of uninitialized value in string comparison (cmp)

Firstly - I think it is better to isolate and _minimize_ the problem definition; shorter and indented XML document might be better for reading. My experience is that I often solve my problem when I minimize it...

Secondly - I GUESS that you try to sort elements which do not have attribute "type".

  • Comment on Re: Use of uninitialized value in string comparison (cmp)

Replies are listed 'Best First'.
Re^2: Use of uninitialized value in string comparison (cmp)
by bharathinc (Novice) on Mar 19, 2010 at 11:14 UTC

    Thanks a lot to every one. I got an hint now to solve this. Sorry about sending a big xml DATA, I was not getting this error when it was few lines of XML. I got the errors only when it was a big xml. In future I will try to send the indented xml. Thanks again to all.


      Yes, that's why pajout mentioned the tip on minimizing your code example. You'll find that while minimizing your code to the minimum case that shows the fault, you'll usually find the line(s) of code or data that exhibit the problem. Once you know those few lines, the error frequently sticks out like a sore thumb. So you get the answer quicker, and learn faster to boot.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://829580]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-06-19 05:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.