Help for this page

Select Code to Download


  1. or download this
    my $twig= XML::Twig->new( twig_roots => { Hit_num => 1 } );
    $twig->parsefile( $file);
    my @hit_nums= $twig->root->children;
    # do stuff with the Hit_num's
    
  2. or download this
    my $twig= XML::Twig->new( twig_roots => { Hit_num => \&hit_num } );
    $twig->parsefile( $file);
    ...
        # to keep the hit_num around
    
      }
    
  3. or download this
    my $twig= XML::Twig->new( twig_roots => { Hit_num => sub { hit_num( @_
    +, $state_info); } } );
    
    # ...
    sub hit_num
      { my( $t, $hit_num, $state_info)= @_;