in reply to Re: Howto Dynamically Create a Hash?
in thread Howto Dynamically Create a Hash?
Just a note about my code design:
I didn't need to use a seperate lookup structure. I could just have interated over the keys of %hash (like Aristotle did). However, iterating over an array will return consistent results whereas iterating over a hash will not.
Given
@nlist = (9,3,27);
always gives
'A' => [9,27], 'B' => [3]
with my code, but can give either
'A' => [9,27], 'B' => [3]
or
'A' => [9], 'B' => [3,27]
(unpredicatbly) when iterating through %hash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Howto Dynamically Create a Hash?
by Aristotle (Chancellor) on Oct 09, 2005 at 23:05 UTC | |
by ikegami (Patriarch) on Oct 10, 2005 at 17:29 UTC |