I am new to perl. I am extracting some nodes information from xml file and I need to print this information in a conman file.
open( my $file, '>', "data" )
while ( $reader->nextElement( 'info' )) {
my $information= $reader->readOuterXml();
$reader->nextElement( 'address' );
my $address = $reader->readOuterXml();
print $file "$information\n";
}
How to print $address information to the same $file. please help me with this.
Add this line after your
printstatement: