in reply to each() function used in associative arrays gives incorrect unordered output.

Hash structures by their nature are unordered lists of scalars - There is no intrinsic order to the index keys which are returned via keys or each. It is discussed in the perldata man page that while a hash may be initialised in a particular order it is no guarentee that iteration of the hash index returns elements in this order - This is also discussed in the perlfunc:keys man page.

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'