Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

when $$s =~ m/\G.../gc is too verbose

by stefp (Vicar)
on Feb 02, 2006 at 22:15 UTC ( [id://527473]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     sub lexer { 
        my($parser)=shift;
    ...
        return ('ID',  $1) if $$s =~ m/\G([A-Z]\w*)/gc;
        ...  # and it goes on for many tentative matches
     }
    
  2. or download this
      *_ = $parser->YYData->{INPUT}; # reference to the string to lex
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://527473]
Approved by Corion
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-19 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found