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

This node falls below the community's minimum standard of quality and will not be displayed.

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