# the arrays of zeros are now the keys %haystack = reverse %haystack; # supposed to search the keys for zero sets that only contain numbers within 0.0001 of an integer my @wants = grep { / (.*\.0000.*)|(.*\.9999.*) / } keys %haystack; # supposed to print out the corresponding values from %haystack print Dumper{ values of a, b, c corresponding to the elements of @wants };