Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

A demanding parser

by gmax (Abbot)
on Jan 25, 2002 at 14:58 UTC ( #141468=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [Event "Botvinnik Memorial"]
    [Site "Moscow"]
    ...
    comment} (16. Nd4 {nested comment}) 16... axb5 17. Nd4 (17. Qc5 c6 18.
    + 
    Nd4 Ra6 19. f4 g6 20. Ra3 Qd7 21. Rfa1 Rfa8) 17... Qe8 18. f4 c5 19. 
    Nxe6 the end 1/2-1/2
    
  2. or download this
    $game = 
    { 'Event' => 'Botvinnik Memorial',
    ...
         '19w' => 'the end'
        }
    }
    
  3. or download this
    my %switchcolor = ( 'w' => 'b', 'b' => 'w');
    my @gamechars = split //, $gametext;
    ...
    # "{" => "}", "(" =>")", "[" => "]"
    # in \@array, starting at $pos
    }
    
  4. or download this
    while (<>) {
        chomp;
    ...
           m/ \G( [^\w\d]+ )/gcx && do { print "other:  $1\n"; redo; };
        }
    }
    
  5. or download this
    while (m/$REmove|$REnumber|$REcomment|$REeolcomment/g) {
        print $1;
    }
    
  6. or download this
    package PGNParser; # temporary name
    use FileHandle;
    ...
            };
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://141468]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2015-08-01 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls