#code that populates hashes here while( my ($oid, $perf) = each %table_match ) { if ( $get_snmp{$oid} == $get_perf{$perf} ) { print "OID: $oid and PERF: $perf are equal in value."; print "The value is $get_snmp{$oid}.\n"; } else { print "OID: $oid has value $get_snmp{$value} " print "while PERF: $perf has value $get_perf{$perf}." print " The two are not equal.\n"; } }