Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    my $simple = XML::Simple::Ordered->new();
    my $data = $simple->XMLin($file);
    
  2. or download this
    sub collapse {
      my $self = shift;
    ...
      
      my $attr  = shift;
      $attr = $self->new_hashref() unless %$attr;    # <-- add this line