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

if I add your line to my program, I get the following error

print Dumper $curr{my}[2], $curr{my}[2]{AB}, \%CD;

Global symbol "%CD" requires explicit package name at ./test.pl line 14.

In addition, how do you print the elements of $curr when using use strict?

foreach (keys %{$curr{"my"}->[2]}){ print $_, " ", $curr{"my"}->[2]{$_}, " "; } print "\n";

Replies are listed 'Best First'.
Re^5: array of hash
by choroba (Cardinal) on May 27, 2014 at 11:26 UTC
    First, you have to
    use Data::Dumper;

    to be able to use Dumper.

    Second, %CD is created only without strict.

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