I am a Parse::RecDescent newbie. Does someone know to write the evaluation in a better way?#!/usr/bin/perl -w use strict; use Parse::RecDescent; my $parser = new Parse::RecDescent (q{ L: '0' L '1' L: '' }); my $string1 = "00111"; my $string2 = "0011"; print $parser->L(\$string1) && $string1 eq '' ? "" : "not ", "in L\n"; + # not in L print $parser->L(\$string2) && $string2 eq '' ? "" : "not ", "in L\n"; + # in L
In reply to Re: A (non) reg-ex question
by codeacrobat
in thread A (non) reg-ex question
by Ido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |