foreach my $friendref ( @{ $VAR1->{ut_response}[0]{friend_list}{friend} } ) { print "Hi $friendref->{user}\n"; } #### @{ # the array referenced by: $VAR1-> # dereference $VAR {ut_response} # then get the value of the hash key 'ut_response' [0] # then get the 0th element of that array {friend_list} # then get the value of the hash key 'friend_list' {friend} # then get the value of the hash key 'friend' } #### my $ut_aref = $VAR1->{ut_response}; my $href = $ut_aref->[0]; my $flist_href = $href->{friend_list}; my $f_aref = $flist_href->{friend}; foreach my $friendref ( @{ $f_aref } ) ...