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"; }
In reply to Re: Find common values in a hash and print the respective keys
by hdb
in thread Find common values in a hash and print the respective keys
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |