in reply to Problem Defining AoA from Named AoA

Both arrays are (different) flat arrays of items. They contain references — the same references. At least, references that point to the same thing. And if two variables hold a reference that points to the same thing, they're almost like aliases (different variables that act as if they're one and the same variable with a different name).*

What you want to investigate is what they call a deep copy or deep cloning. I recall merlyn wrote a magazine article or two about them. See UR col 30.

Also check out Storable, a standard module that includes a function for deep copying: dclone.

p.s. The difference between variables containing the same reference, and aliases, is just this: only a direct full assignment to one of the variables, will break the interconnection. Let me give an example:

$x = { a => 1 }; # a reference $y = $x; # a copy of a reference points to the same thing $y->{a}++; # increments $x->{a} $y->{b} = 3; # adds a hash item $x->{b} $y = { c => 0 }; # breaks the connection between $x and $y $y->{c}++; # no effect on $x