BTW you must put a -> between the Layer2Detail and the Device
Actually, the arrow is optional in that position. You need the first one, since without it, Perl would interpret $ref{Layer2Details} to mean the value associated with the 'Layer2Details' key in %ref, rather than the value associated with the 'Layer2Details' key in hash referred to by $ref.
All this and more is explained in Mark's very short tutorial about references which is part of your Perl distribution.
In reply to Re^4: Extracting tagged data from a XML file
by grantm
in thread Extracting tagged data from a XML file
by theroninwins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |