in reply to Re: Forcing dereference
in thread Forcing dereference

Exactly right. Let me illustrate what is happening. Your data structure looks like (simplified):

$foo = { 'SOMETHING_01' => {'CLASS' => [ {'VALUE' => 'BUBBLE' } ] } }
Let's do a little analysis, assuming $foo retains its value:
$bar = $foo->{SOMETHING_01}; # $bar is hash reference $caz = %{$foo->{SOMETHING_01}; # $caz is a hash print $caz{'CLASS'}; # 'ARRAY(...)' - an array reference print $caz{'CLASS'}->[0]; # 'HASH(...)' - a hash reference
Note that when you copy a reference, you aren't copying the data -- you're making a new reference to the same data. By using the deep-copy method of the parent, you copy the data contained in the reference instead of the reference itself.

radiantmatrix
require General::Disclaimer;