in reply to XML::LibXML save variable data to a file
open my $fh, '>', 'output.txt' or die "cannot open output.txt: $!"; foreach my $attrib (@licenses) { my $name = $attrib->getAttribute('name'); my $count = $attrib->getAttribute('count'); print $fh "$name:$count\n"; }
|
|---|