#!/usr/bin/perl -w foreach $key (keys %value_xml){ if($key eq "IAFIM"){ foreach $dis (sort keys %{$value_xml{$key}}){ print "\n4: $key - $dis"; } } } if (defined $value_xml{"IAFIM"}{"PLMN-PLMN/MRBTS-999977/LNBTS-999977/LNCEL-1"}{"ocAcBarAC"}) { print "yes"; }else{ print "no";} foreach $key (keys %value_xml){ if($key eq "IAFIM"){ foreach $dis (sort keys %{$value_xml{$key}}){ print "\n4: $key - $dis"; } } }