Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Hash problem.

by mbond (Beadle)
on May 16, 2001 at 16:30 UTC ( [id://80864]=note: print w/replies, xml ) Need Help??


in reply to Re: Hash problem.
in thread Hash problem.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: Re: Hash problem.
by Sifmole (Chaplain) on May 16, 2001 at 16:52 UTC
    This is just plain bad advice. This is like the commonly used analogy of turning up the radio so you can't hear the nasty noises your engine is making.

    The message is telling you something useful, like you are probably attempting to use a result that is coming back as undefined. The correct answer would be to modify your code to catch this case and recover gracefully; Not turn up the radio so you can't hear the noise.

Re: Re: Re: Hash problem.
by stephen (Priest) on May 17, 2001 at 03:24 UTC
    I'm '--'ing this node, a rare event for me, for two reasons. First, taking out "use strict" is a bad idea to begin with. Second, try this:
    % perl -e 'sub foo { return undef; } print foo()->{"fish"}{"head"}' Can't use an undefined value as a HASH reference at -e line 1.
    That's with strict turned off.

    So not only is the advice bad, but the solution won't work. Nothing personal to mbond, but that sorta reduces the value of the node. ;)

    stephen

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found