Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This would print the hash in order -my %verb = ( 'To Move' => 'Zegi', 'To Break' => 'Loga', 'To Think' => 'Fzetra', );
How would I print it randomly every time?foreach my $verb (sort keys %verb) { print $verb; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Randomize a Hash
by BrowserUk (Patriarch) on Oct 16, 2004 at 19:00 UTC | |
|
Re: Randomize a Hash
by TedPride (Priest) on Oct 16, 2004 at 20:14 UTC |