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

Re: Debugging "Use of uninitialized value" warnings.

by f00li5h (Chaplain)
on Apr 04, 2007 at 03:02 UTC ( #608193=note: print w/ replies, xml ) Need Help??


in reply to Debugging "Use of uninitialized value" warnings.

use Data::Dumper; print Dumper [ $bar{'one'}, $foo{'one'} ];
will tell you which one is undef.

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;


Comment on Re: Debugging "Use of uninitialized value" warnings.
Select or Download Code
Re^2: Debugging "Use of uninitialized value" warnings.
by cwry (Monk) on Apr 04, 2007 at 03:07 UTC

    Thanks, but that's not what I'm after. As I said originally:

    if I receive this warning in a non-trivial program, I can go back and insert some debugging code to check which one of $bar{'one'} or $foo{'one'} is unitialized.

    What I want (as I said), is to have Perl automatically tell me which of the two were uninitialized within the warning, without resorting to inserting additional debug code (as is the case of using Data::Dumper)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-08-27 21:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls