Russ, thanks for your incredibly detailed response to my question. I am currently studying it as if it were the Bible.
I was intrigued by the syntax:
push @{ $First{ $A
} }, $_ for (0..$#A);
I understand what this statement does, but not why it works.
P. 259 of the Camel book says that "The argument to push must be a real array, not just a reference to an array."
So far so good. It looks as if the syntax creates an anonymous array whose elements are the values of %First.
But I see a problem. It says on page 531 of the Camel book that "Hash values do not spring into existence upon reference."
So it seems to me that we have a deadlock here. Push demands a value of %First, but %First can only get its values from Push.
It seems to me that at the first iteration the command is equivalent to:
push @{$First{1}},0;
But this ought to fail because at the time of the first iteration $First{1} does not exist.
Can anyone explain?