- or download this
use XML::Simple qw(:strict);
$config = XMLin('config.xml', KeyAttr => {item=>'filename'}, ForceArra
+y => ['item']);
- or download this
<?xml version="1.0" encoding="UTF-8"?>
<config>
...
<destination_dir>test2</destination_dir>
</item>
</config>
- or download this
for (my $i = 0; $i < $theNumberOfItems; $i++)
{
print $config->{item}[$i]->{destination_dir};
}
- or download this
for (my $i = 0; $i < $theNumberOfItems; $i++)
{
print $config->{item}{$i}->{destination_dir};
}