This code
my %lot = ("a" => 1, "b" => 2, "c" => 3, "d" => 4); for my $i (%lot) { print $i . "\n"; }results in
c 3 a 1 b 2 d 4on my home machine (Ubuntu 10.04) with Perl version 5.10. But on my schools Solaris machine with Perl version 5.004 I get more of the result I expect, which is
a 1 b 2 c 3 d 4
So is there a good explanation for this, or is it just some strange feature?
I moved c => 3 to other places in lot (for example my %lot = ("a" => 1, "b" => 2, "d" => 4, "c" => 3); ) but get the same result.