Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I shouldn't like anyone to think I'm an expert, but my £/50 is that it's nice to make the code read as much like English as possible. When I'm writing prose, I try to put the most important bit of the sentence in the most prominent place. So, say there are two buttons, a read and a blue one, and the red one is the ejector seat. If I'm writing to somebody who knows that one of the buttons will blow you out of your seat, I'd write
if you press the red button, the ejector seat will launch
But if I was writing to somebody who knew the red button was a bad idea but didn't know exactly what was bad about it, I might write
the ejector seat will launch if you press the red button
So my choice between B and C is
if (the condition is more significant than what I do if the condition +is met) { use option C; } elsif (what I do if the condition is met is the interesting bit) { use option B; } else { probably use C on the same basis as [bjohnso]; }
You notice that here I used C, since we all know what the different options are, and what's at issue is under what conditions we use them.

§ George Sherston

In reply to Re: Conditional style (if, &&) query by George_Sherston
in thread Conditional style (if, &&) query by traveler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found