in reply to hash comparison
For maximum, invert the < sign.for my $key (keys %candidate) { print "$key -> "; my $cand = $candidate{$key}; my $ref = $reference{$key}; if ($ref and $ref < $cand) { print $ref; } else { print $cand; } print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash comparison
by sarvan (Sexton) on Jul 25, 2011 at 07:47 UTC | |
by choroba (Cardinal) on Jul 25, 2011 at 13:29 UTC |