Help for this page

Select Code to Download


  1. or download this
    use Parse::RecDescent;
    
    ...
    $parser = Parse::RecDescent->new(q` test: /\d+/ `);
    print($parser->test('1') ? 'ok' : 'fail', "\n");  # ok
    print($parser->test('0') ? 'ok' : 'fail', "\n");  # fail