Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 meditating upon the Monastery: (8)
As of 2014-12-26 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls