Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Variables and Scope: The battle begins

by Bloodnok (Vicar)
on Dec 12, 2013 at 09:33 UTC ( [id://1066787]=note: print w/replies, xml ) Need Help??


in reply to Variables and Scope: The battle begins

If time is of the essence, why not utilise the depth of knowledge already in CPAN e.g. Parse::RecDescent, or has this become a problem that you now have to solve for yourself ?

Just a(nother:-) thought ...

A user level that continues to overstate my experience :-))
  • Comment on Re: Variables and Scope: The battle begins

Replies are listed 'Best First'.
Re^2: Variables and Scope: The battle begins
by VincentK (Beadle) on Dec 12, 2013 at 16:42 UTC
    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");
      I will check these out, thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1066787]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found