Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2016-12-03 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (56 votes). Check out past polls.