in reply to Re^3: FATAL ERROR: Can't use string ("HASH(0x875fffc)") as a HASH ref while "strict refs" in use at
in thread FATAL ERROR: Can't use string ("HASH(0x875fffc)") as a HASH ref while "strict refs" in use at

You' re right.

I was wrong just because I think that Tie should manage also inner hash. Now it's all more clear and I fix my program so it now works as expected.

Thanks to everyone.

  • Comment on Re^4: FATAL ERROR: Can't use string ("HASH(0x875fffc)") as a HASH ref while "strict refs" in use at

Replies are listed 'Best First'.
Re^5: FATAL ERROR: Can't use string ("HASH(0x875fffc)") as a HASH ref while "strict refs" in use at
by Anonymous Monk on Jun 20, 2008 at 07:39 UTC
    sub ab { $hash = { abc => 'cde', }; return "$hash is the value"; } $str = ab(); with $str how can i access the has of abc and its value. Since, its hash ref in a string..

      Basically, you can't. The memory allocated to $hash is released as soon as ab returns because there is no reference to $hash anymore. If you need a reference to data, keep it as a reference. Don't convert it to a string.