Help for this page

Select Code to Download


  1. or download this
    use Data::Printer;
    p $data;
    
  2. or download this
    \ {
        node   [
    ...
            }
        ]
    }
    
  3. or download this
    foreach my $node (@{$data->{node}}) {
        print $node->{name}.": ".$node->{text}."\n";
    }
    
  4. or download this
    1st node: Text of 1st node
    2nd node: Text of 2nd node
    3rd node: Text of 3rd node
    
  5. or download this
    my $xml = XML::Simple->new( KeyAttr => 1, ForceArray => 0, KeepRoot =>
    + 1 );