Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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: (6)
As of 2017-01-21 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (182 votes). Check out past polls.