evilgoblin has asked for the wisdom of the Perl Monks concerning the following question:
is the output the same every time the program is run Or is there a possibility of the output being different (basically is there a random component, every time the program is run, to the ordering of the hash keys given that the key and the values stay the same).%hash = ( '1' => 'one', '2' => 'two', '3' => 'three',); for $key (keys %hash) { print "$key\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: random behaviour of perl hashes
by lima1 (Curate) on Aug 28, 2006 at 00:16 UTC | |
|
Re: random behaviour of perl hashes
by Tanktalus (Canon) on Aug 28, 2006 at 00:39 UTC | |
by evilgoblin (Novice) on Aug 28, 2006 at 01:08 UTC | |
|
Re: random behaviour of perl hashes
by blue_cowdawg (Monsignor) on Aug 28, 2006 at 02:19 UTC | |
by gellyfish (Monsignor) on Aug 28, 2006 at 08:00 UTC | |
by swampyankee (Parson) on Aug 28, 2006 at 20:48 UTC | |
by liz (Monsignor) on Aug 28, 2006 at 20:57 UTC | |
by swampyankee (Parson) on Aug 28, 2006 at 21:13 UTC | |
|
Re: random behaviour of perl hashes
by Joost (Canon) on Aug 28, 2006 at 21:39 UTC | |
by tye (Sage) on Aug 28, 2006 at 21:49 UTC |