in reply to Trees in XML
The $tree - is it an array? a scalar? a variable?ref can answer that for you:
print ref($tree), "\n";
outputs:
ARRAY
Or, if you read the free manual (XML::Parser), it says:
For elements, the content is an array reference.
Or, looking at the Dumper output:
$VAR1 = [ 'list', [ { 'name' => 'name list' }, 0, ' ',
the square bracket signifies an array ref.
how do I get access to it?
perlreftut is a good place to begin figuring out how to access Perl data structures such as this.
|
|---|