It's that classic blunder, less well known than getting involved in a land war in Asia: use of numbered variables instead of an array! Especially when the OP calls for it.
use strict;
use warnings;
my @aoh;
push @aoh, { one => 1, two => 2 };
push @aoh, { three => 3, four => 4 };
push @aoh, { five => 5, six => 6 };
dump_keys( $_ ) for @aoh;
sub dump_keys { print "$_\n" for keys %{+shift} }
Update: jeffa has since revised his answer to make my comment irrelevant.
But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)
|