my @filtered_keys = grep { $_ > 0.4 } keys %hash; foreach $key ( @filtered_keys ) { # Do something with $hash{$key} , which will be the # url's pertaining to each of the keys whos numeric # value is greater than 0.4. }