Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: How to define a list of regular expressions?

by pat_mc (Pilgrim)
on Jul 01, 2009 at 10:21 UTC ( #776375=note: print w/ replies, xml ) Need Help??


in reply to Re: How to define a list of regular expressions?
in thread How to define a list of regular expressions?

Thanks, Anonymous Monk ...

What, though, if I do not want to loop over the regexes but retrieve them from the list via shift when needed? Can you point out to me where or why my code is broken?

Thanks - Pat


Comment on Re^2: How to define a list of regular expressions?
Download Code
Re^3: How to define a list of regular expressions?
by grizzley (Chaplain) on Jul 01, 2009 at 12:09 UTC
    Instead of
    my $regex = qr/shift @regexes/;
    do just
    my $regex = shift @regexes;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-08-29 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (277 votes), past polls