tart has asked for the wisdom of the Perl Monks concerning the following question:
Cheersuse strict; use warnings; my %h; push @{$h{CUST}}, [ { NAME => 'Mr.y', ADD => 'Hell', } ]; push @{$h{CUST}}, [ { NAME => 'Mr.z', ADD => 'Hell', } ]; push @{$h{ADMIN}}, [ { NAME => 'Mr.x', ADD => 'Hell', } ]; my $name; my $val = $h{CUST}; my $i = 0; for($i, $i<@$val, $i++) { my $hash = $val->[$i]; foreach(@$hash) { print $_->{NAME}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: get value of hash hold by array and array hold by another hash
by Marshall (Canon) on Aug 24, 2010 at 03:38 UTC | |
|
Re: get value of hash hold by array and array hold by another hash
by toolic (Bishop) on Aug 24, 2010 at 03:43 UTC | |
|
Re: get value of hash hold by array and array hold by another hash
by TomDLux (Vicar) on Aug 24, 2010 at 05:15 UTC | |
|
Re: get value of hash hold by array and array hold by another hash
by TomDLux (Vicar) on Aug 24, 2010 at 05:32 UTC |