Basic sort is OK. Nearly all complex operations that would map, grep and sort are usually done in the database before Perl even gets its hand on the data.

Yes, sometimes using implicit variables is, unfortunately, unavoidable because of the way some stuff is designed in Perl. But whereever possible, implicit variables are a no go.

This is just basically part of the design guidelines i've come up for my projects, just like "always croak never die" and "use English". This may or may not make sense for someone elses projects, and i wouldn't even dare to prescribe my coding style to some random stranger on the internet.

But for the code i bear responsibility (my own and those of my coworkers that work under me), i decided long ago that, when it comes to design and coding guidelines, i might as well run the whole thing as a dictatorship. A benevolent one, maybe. But as long as its my neck that's on the line, i can at least make sure the gallows are properly engineered to my standards, audited regularly, with the hangmans training up to date...

Making the code easier to read and understand, even for newbies (and people that are used to other programming languages), certainly helps with making the code more robust and error free. To quote a book i read a few months ago: As a quality-control supervisor for a NASA contractor reminded his workers during the Apollo days, it takes just one “Oh, shit!” to replace a thousand well-done tasks.


In reply to Re^5: 5.40 released by cavac
in thread 5.40 released by hippo

Title:
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, details, 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, summary, 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.