in reply to Bi-Directional Hash Lookup
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', }, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bi-Directional Hash Lookup
by PerlingTheUK (Hermit) on Oct 11, 2005 at 12:06 UTC | |
by pajout (Curate) on Oct 11, 2005 at 12:57 UTC |