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.
在print
语句后添加以下行:
print $file "$address\n";
print $file "$information\n";
print $file "$address\n";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.