Sorry I didn't awnser the other half of your question.
$self is a ref to the Field structure.
$self->$item is a ref to one of the keys in Field, dependant on the looping.
$self->$item->$subItem is a ref to one of the keys in SubField for Field, again depending on the iteration of the loops.
This is a ref to the value in the tree at $subItem for $item for Level2 for Level1.
$tree->{Level1}->{Level2}->{$item}->{$subItem}
This is supose to act as a setter for $self.
$self->$item->$subItem ( ) ;
Simply put, you get $subItem from tree and place it into $subItem of $self. | [reply] |
If I'm understanding you correctly, you're not using proper syntax for hash references. If $self is a HASH ref, and $item is a key, then $self->{$item} and not $self->$item are what you want.
| [reply] |