According to the perl doc page:
Hashes are unordered collections of scalar values indexed by their associated string key.
I would have thought perl hashes are ordered since they are usually constructed using array:
my %h = ("a",1,"b", 2);
If Perl hashes are unordered, they need to be "hash"-ed to allow access. Question is when does Perl hash the hashes?
If we do:
my %h = ("1",1); #1
print $h{"1"}; #2
I am assuming this line #1 is doing the hashing internally.
If a hash is constructed from array:
#@a = ("1", 1);
my %h = @a;
I am assuming the assignment to %h is doing the hashing.
Please confirm if my assumption is correct and I don't seem to find the details anywhere on the internet.