Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

This is a false problem. Some of this advices are only cosmetic. People are different and always will be, you can't expect that the next guy that will read your code have the same brain structure or habits that you

I tend to think in terms of structures, so I personally hate the "stammer code" extending over seven pages

while (blah) {... cri cri if (/this/) {... cri cri do thiiiis }.... cri cri elseee .... {.... cri cri do thaaaat } }... violins

An excess of hesitation really makes me feel very nervous. As long as all options fit in a line, this is much better for me

While(blah){ if(/match/){ do_this() } else { do_that() } # no, I don't like the "} else" way, you lose the symmetry } (blank line here)

If you have a legacy code that you need to maintain, and you like, i.e, to see a carriage return between "if(blah)" and "{" don't suffer seing this disgusting (for you) structure all the time... make a copy of the code, lock the original in a safe place under seven keys and USE PERL regexes to "reorder the furniture of this room" in the copy as you like. What is the big fuss?

s/"I really hate this stupid way of writing code in a single line"/"That's \n much \n better now"/

If you add a sentence to a block and forget the ";" the program will emit a warning with the number of the exact offending line. Solution: read the warnings...

I you can use five characters to build your functional code structure don't use six (unless the omited character makes the code unreadable), but if you can use six characters to document your code don't use five.

In reply to Re: 20 most important Perl Best Practices by pvaldes
in thread 20 most important Perl Best Practices by greengaroo

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Corion]: Hi marto!
    [Corion]: I hope you're well ;)
    [marto]: almost :)
    [Corion]: I feel a cold coming on - I guess I'll try to get through this day (visit to my godson this evening) and then a hot tub and tomorrow work from home, or not at all...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (9)
    As of 2018-03-20 09:22 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (248 votes). Check out past polls.