in reply to Iteration order of a foreach

It does it in order, and that's not something that's going to change in Perl5 because that would break just about every script that uses foreach.