in reply to Re: Variables and Scope: The battle begins
in thread Variables and Scope: The battle begins

To expand on this great suggestion from Bloodnok, I found a nice tutorial for the parser.

http://www.perl.com/pub/2001/06/13/recdecent.html

From

http://www.perlmonks.org/?node_id=108182

Sample code from the tutorial.

use strict; use warnings; use Parse::RecDescent; # Create and compile the source file my $parser = Parse::RecDescent->new ( q( startrule : day month /\d+/ day : "Sat" | "Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri +" month : "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec" ) ); # Test it on sample data print "Valid date\n" if $parser->startrule("Thu Mar 31"); print "Invalid date\n" unless $parser->startrule("Jun 31 2000");

Replies are listed 'Best First'.
Re^3: Variables and Scope: The battle begins
by Shadow-Master (Initiate) on Dec 12, 2013 at 20:20 UTC
    I will check these out, thank you.