Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Trying to skip for $LEV = 0

by virtualsue (Vicar)
on Jan 28, 2007 at 11:28 UTC ( #596961=note: print w/ replies, xml ) Need Help??


in reply to Trying to skip for $LEV = 0

Beware of using regular expressions in place of '==':

#!/usr/bin/perl use warnings; use strict; my $val = 1100; print "Value contains a 0\n" if $val =~ /0/; print "Value is actually equal to 0\n" if $val =~ /^0$/;
Don't obfuscate your code by using pattern matching when you don't need it.


Comment on Re: Trying to skip for $LEV = 0
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2015-09-01 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (370 votes), past polls