##
print STDERR Dumper @{$ams_hosts};
##
##
$VAR1 = {
'domainId' => '1',
'deviceIp' => '172.16.133.56',
'deviceType' => 3,
'deviceName' => 'AMS'
};
$VAR2 = {
'domainId' => '1',
'deviceIp' => '172.16.133.57',
'deviceType' => 3,
'deviceName' => 'ams_57'
};
##
##
my %ams_ips_hash = map {$_->{'deviceIp'}++} @{$ams_hosts};
$ams_ip = "" if !exists $ams_ips_hash{ $ams_ip};