I have been using this code:
while (($key, $value) = each (%hash))
To iterate through a hash. However, the order of the keys that it retrieves are exactly the same each time i run the script. I looked to google for answers and found the following bug report. From other sources, it seems that this is normal.
Are there any workarounds to make the order random? With an array, I would probably just do this:
$x = int(rand(14)); #assuming the array has 15 elements
print "$array[$x]";
Is there anything like that for hashes?