in reply to Find common values in a hash and print the respective keys
If you want to avoid to build a hash of arrays, you could concatenate the key strings with a delimiter that does not exist in the values. Something like
my %rev; while( my( $key, $val) = each %hash ) { $rev{$val} .= "|$key"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find common values in a hash and print the respective keys
by LanX (Saint) on May 26, 2013 at 19:09 UTC |