Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Short or Long Hand

by davorg (Chancellor)
on Aug 12, 2004 at 15:33 UTC ( #382306=note: print w/replies, xml ) Need Help??


in reply to Re: Short or Long Hand
in thread Short or Long Hand

Maybe because regexes are harder to get right.

If you're not 100% sure that $day will always be between 0 and 6 (and I'm not sure you ever can be!) then you'd be better off with:

print $day, $/ if $day !~ /^(0|6)$/;

Precendence can be a problem :)

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://382306]
help
Chatterbox?
[Corion]: GrandFather: Yeah, I'm currently in the same situation - I get DOM node IDs from Chrome, except that they vanish at some point in time, or event, or whatever. My current workaround is to re-fetch the node IDs all the time, but that is slow

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-08-24 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (365 votes). Check out past polls.

    Notices?