Ciao, filippo!
filippo scrisse:
I load my hash with my order, am I sure that the order is preserved on
command 'foreach (key %myHash)?
No. Hashes are not guaranteed to return the keys in the order they
were made. The keys() function returns the keys in the order most
convenient to the hash, which is almost never the same as the order
most convenient to you.
If you want to get the keys in the order they were inserted, run
this command at your DOS/Unix prompt:
perldoc -q "keep my hash sorted"
It'll tell you to look at the Tie::IxHash module, which is a special
module that allows you to create hashes that remember what order their
keys were added in -- and so will return the keys in that order when
you call the keys() function.
Buona fortuna, filippo.
-- Jean-Luc