What's wrong with 2 hashes?
Maybe a HoH is what you need?
So $a= $bidir{'column2'}->{$b} will give you "the other" value.my %bidir= ( column1 => { a => 'b', }, column2 => { b => 'a', }, );
In reply to Re: Bi-Directional Hash Lookup
by Skeeve
in thread Bi-Directional Hash Lookup
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |