in reply to Re^3: array of hash
in thread array of hash

it's seems that I can access $curr{"my"}->2{"AB"} correctly but not for CD as the key when using strict. Why?

Do you have the solution how to build and access the array of hash correclty? I get more and more confused

Replies are listed 'Best First'.
Re^5: array of hash
by choroba (Cardinal) on May 27, 2014 at 12:28 UTC
    It's simple.
    $curr{my}[2] = 'CD';

    There's no hash under 2, only a string. So you can't access a hash. The solution is to build the structure correctly.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ