in reply to Hash Question
If this is not what you are looking for, post some of your hash contents and some of your code.use strict; use warnings; use List::Util qw(max); use Data::Dumper; my %h = (a=>2, b=>8, c=>7); my $max = max(values %h); for (keys %h) { delete $h{$_} unless $h{$_} == $max } print Dumper(\%h); __END__ $VAR1 = { 'b' => 8 };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash Question
by perl_n00b (Acolyte) on Nov 23, 2009 at 02:03 UTC | |
by keszler (Priest) on Nov 23, 2009 at 03:16 UTC |