Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2016-07-30 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (264 votes). Check out past polls.