Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if(defined $hash{$key}) { $key = $key + .0000001 until !defined $hash{$key}; $hash{$key} = $value; } else { $hash{$key} = $value; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: incrementing hash values
by thor (Priest) on Dec 24, 2004 at 03:54 UTC | |
|
Re: incrementing hash values
by Aristotle (Chancellor) on Dec 24, 2004 at 03:54 UTC | |
|
Re: incrementing hash values
by rev_1318 (Chaplain) on Dec 24, 2004 at 13:19 UTC | |
by Aristotle (Chancellor) on Dec 24, 2004 at 13:38 UTC | |
|
Re: incrementing hash values
by Anonymous Monk on Dec 24, 2004 at 23:39 UTC |