my $xp = XML::XPath->new(xml => $fpdomaininfo ); my $nodeset = $xp->find('//cidr-map'); foreach my $node ($nodeset->get_nodelist) { my $node_name = $node->findvalue ( '@name' ); my $ips_as_string = XML::XPath::XMLParser::as_string($node); $ips_as_string =~ s/ /:/g; # this prints nice list of ipaddresses # 127.0.0.1:198.168.1.1:198.168.1.2 print "

" . __LINE__ . "
" . $ips_as_string . "

\n"; #### my @ips = split /:/, $ips_as_string; # Dumper outputs this ... # 589 # $VAR1 = ' print "

" . __LINE__ . "
" . Dumper( @ips ) . "

\n"; ##
## 589 $VAR1 = ' #### # this prints crap if XML in it !!! for my $ip ( @ips ) { print "$ip
"; }