in reply to Re^2: Need advice on checking two hashes values and keys
in thread Need advice on checking two hashes values and keys

You're welcome. One way of doing it with a hash of arrays while maintaining the original order would be to save the line number in which you find each key together with its value. So your hash after the first loop would look like this:

$hash = ( uno => [ 1, 'uno' ], due => [ 2, 'dos' ], tre => [ 3, 'tres' ], # and so on );

Then after the second loop it would look like this:

$hash = ( uno => [ 1, 'uno','un' ], due => [ 2, 'dos','due' ], tre => [ 3, 'tres','tris' ], # and so on );

Then you'd need to learn how to sort the hash on the first element in each sub-array so that you can print them out in order. If you want to try that, then inside your first loop, you can get the line number to go with each key/value pair from the special $. variable.

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.