in reply to Re: Hash reference
in thread Hash reference

Thanks very much. That worked. I didn't think the braces were needed, but they make all the difference.
&myfunc($a_ref->$w); # BAD &myfunc($a_ref->{$w}); # GOOD
Yes, "xyz" was the key.

Replies are listed 'Best First'.
Re^3: Hash reference
by monarch (Priest) on Jun 04, 2005 at 00:40 UTC
    The braces are indeed important because you're providing a key, and expecting a value. The value is actually a reference!

    When you don't provide the braces you are no longer passing a key and expecting a value. Instead you're trying to call a function!

    That's why you get the error message, can't call method on unblessed reference.. because you have a hash, not an object.