in reply to split and sort functions
Hashes are called like this because despite being really (from the conceptual pov) associative arrays, they're actually implemented by means of a hashing function. This makes them intrinsically unordered objects. You have either to sort yourself or resort to an object that behaves like a hash preserving order, possibly at the expense of some efficiency: check for example Tie::Hash::Sorted.
Update: I hadn't understood the bit about "without of %hash in foreach". If now I understand it correctly... all in all this would be perfect for Perl 6's zip()...
|
|---|