Quote:
Originally Posted by stukov
Now, is a HASH an array itself?
|
No.
hashes can not have duplicate keys.
also, the keys in a hash are not ordered.
For example,
Code:
%hash1 = @array1; @array2 = %hash1 ; %hash2 = @array2;
array2 will likely have a different ordering from array1, hence different. but, hash1 will be the same as hash2.
arrays have a small performance advantage. and neither is particularly space efficient in perl.