in reply to get value of hash hold by array and array hold by another hash

I think your data structure is not quite what you intended. When you make a more complex data structure, Dumper is your friend! One level of array is not necessary and I modified you code to take it out (run Dumper) on your code to see the difference. You were making an array of anon array references to anon hash references where each anon array only had one anon hash reference instead of simply an array of anon hash references.

@{$h{CUST}} is an array of hash references. Just take each hash reference and de-reference the NAME parameter.

#!/usr/bin/perl -w use strict; use Data::Dumper; 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', }; print Dumper \%h; foreach my $href ( @{$h{CUST}}) { print " CUST NAME: $href->{NAME} \n"; } __END__ $VAR1 = { 'ADMIN' => [ { 'NAME' => 'Mr.x', 'ADD' => 'Hell' } ], 'CUST' => [ { 'NAME' => 'Mr.y', 'ADD' => 'Hell' }, { 'NAME' => 'Mr.z', 'ADD' => 'Hell' } ] }; CUST NAME: Mr.y CUST NAME: Mr.z
Update: Just wanted to show a couple of examples of how to print the OP's original structure. This C style for loop is not necessary. I guess toolic and I were composing our answers at the same time. The main thing is that we both got rid of an unnecessary level of de-referencing and although that is very, very important, proper use of Perl iterator operators is the reason that the "print" code got so much easier.
#one way for initial structure foreach my $aref ( @{$h{CUST}}) { print " CUST NAME: $aref->[0]->{NAME} \n"; } #another way for initial structure foreach my $href (map{$_->[0]} @{$h{CUST}}) { print " CUST NAME: $href->{NAME} \n"; }