Help for this page

Select Code to Download


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