Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: quick regex help for multiple OR

by convenientstore (Pilgrim)
on May 13, 2008 at 04:11 UTC ( [id://686192]=note: print w/replies, xml ) Need Help??


in reply to Re: quick regex help for multiple OR
in thread quick regex help for multiple OR

thanks Dragonchild, this looks like good solution.

Didn't realize you can do that w/ regex
Just wanted to add that, OP should be using below as well.
next unless $line =~ $regex;

Replies are listed 'Best First'.
Re^3: quick regex help for multiple OR
by McDarren (Abbot) on May 13, 2008 at 10:43 UTC
    s/should/could/;

    That's a matter of personal preference.
    In PBP, TheDamian recommends avoiding the use of unless. Mainly because statements can very quickly become quite difficult to read if you start extending them and adding multiple conditions.

    I tend to agree with this view, but as I say - it's really a matter of personal preference.

    Cheers,
    Darren :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found