in reply to Matching values in Hash Arrays

Excuse me while I whip this out:
#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"; } }
Whether or not you use references shouldn't really effect the performance.

thor

Update:Fixed typo as per below.

Replies are listed 'Best First'.
Re^2: Matching values in Hash Arrays
by Crackers2 (Parson) on Jun 19, 2004 at 14:19 UTC

    Small but important typo in there:

    if ( $get_snmp{$oid} == $get_perf{$oid} ) {

    should be

    if ( $get_snmp{$oid} == $get_perf{$perf} ) {