Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: My coding guidelines

by Aristotle (Chancellor)
on Nov 30, 2002 at 18:18 UTC ( #216671=note: print w/replies, xml ) Need Help??


in reply to Re(4): My coding guidelines
in thread My coding guidelines

print "$pattern not found in $file\n" unless $found;
I use unless when I expect that the print will be executed most of the time - unless the condition happens to be true. In the quoted case, I'd probably use if not, as the if highlights the fact that the message is only printed if the pattern wasn't found. Just like the way you use "if" and "unless" in English.

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://216671]
help
Chatterbox?
[robby_dobby]: guess I have to take a look at it off-work. I don't understand what those words mean, honestly :-)
[Corion]: Oooh. Tinc really looks good. It seems that it could even be used to link up (a segment of) my home network with (a segment of) a friends network, to create a private network over the internet
[marto]: fun times :)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2018-01-17 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (201 votes). Check out past polls.

    Notices?