in reply to XML Output

I believe your issue is a result of using a scalar context on the results of the findnodes() call on line 14. I changed the code from (lines 14-15):

my ($caname) = $node->findnodes('./extendedAttributes/attribute'); print $nodename->to_literal, "\n", "\t", $caname->to_literal, "\t", +"\n"
to:
my (@canamel) = $node->findnodes('./extendedAttributes/attribute'); foreach my $caname (@canamel) { print $nodename->to_literal, "\n", "\t", $caname->to_literal, "\t" +, "\n"; }
and the output included a second entry for 172.30.1.7.

Hope that helps.

Replies are listed 'Best First'.
Re^2: XML Output
by bitretriever (Initiate) on Dec 08, 2013 at 05:35 UTC

    Thanks that solved my problem and expanded my understanding of variables<\p>