Help for this page

Select Code to Download


  1. or download this
    use XML::Simple qw(:strict);
    
  2. or download this
    use strict;
    use XML::Simple qw(:strict);
    ...
      print "$book->{title}\n";
      print "  $_\n" foreach(@{$book->{author}});
    }
    
  3. or download this
    No value specified for 'forcearray' option in call to XMLin() at ./str
    +icttest.pl line 26
    
  4. or download this
    my $library = XMLin($xml, forcearray => [ qw(book author) ]);
    
  5. or download this
    No value specified for 'keyattr' option in call to XMLin() at ./strict
    +test.pl line 26
    
  6. or download this
    my $library = XMLin($xml,
      forcearray => [ qw(book author) ],
    ...
    );
    
    print $library->{book}->{1565922204}->{title}, "\n";
    
  7. or download this
    my $library = XMLin($xml, forcearray => [ qw(book author) ], keyattr =
    +> [] );
    
  8. or download this
    Learning Perl, 3rd Edition
      Randal L. Schwartz
    ...
    Guitar for Dummies
      Mark Phillips
      John Chappell
    
  9. or download this
    my $library = XMLin($xml,
      forcearray => [ qw(author) ],
    ...
    );
    
    print $library->{book}->{1565922204}->{title}, "\n";
    
  10. or download this
    <book> set in keyattr but not in forcearray at ./stricttest.pl line 26