> any ideas on how to create reverse hash quick?
> ...
while (my ($key, $value) = each %hash) {
warn "Collision during inversion!"
if exists $hash{$value};
$new_hash{$value} = $key;
}
of course, if you are doing this a lot then you
need a different structure. The solution is
obvious... maintain a pair of hashes - wrapped in
an object. This is likely to already be on CPAN,
under the proper scientific name.
Jonathan Paton
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]