in reply to What is correct way to reference?
You can find more information on references in perlref and in the References tutorials.
Here what you need is get the array from the reference, which is called dereferencing. This can be done either as: foreach (@{ $xmlcollection->{phone}->{callTo} }) or foreach ($xmlcollection->{phone}->{callTo}->@*). The latter is only available in recent versions of perl (by default in v5.24, or as an optional feature in v5.20 and v5.22, see Postfix Dereference Syntax).
|
|---|