foreach (keys %{$PossibleTotals{9}}) { $TempHash{int($_)} = 1 if (($_ < 10000) && (int($_) == sprintf("%.7f", $_))); print "$_ : ${$PossibleTotals{9}}{$_}\n" if $_ =~ /^19[45]\./; }