in reply to Counting Hash values?
Convert %out values from hash ref to array of keysforeach (values %in) { /(.*?)\|(.*)/; $out{$2}{$1} = 1; }
I'm assuming there may be repeated values in the input but you only want each number once per key in the output.foreach (values %out) { $_ = [sort keys %$_]; } # $out{"RED DOOR|10-14"}[0] = 73 etc
|
|---|