Ah, grasshopper, you seek knowledge, but the time is not yet right to reveal this to you. First, you must learn patience!

Meditate upon this now..

Update: I should explain this comment: I believe all programmers seek to write the most optimal code, it is utopia! But it is a quest that takes us our natural lives and enlightenment comes with study and practice. The question being asked, i.e. how to do this in Perl, can be partially answered by learning any computer language (as others have mentioned below about gaining wisdom of algorithms and such). And specific understanding of efficiency in Perl can be gained by studying and utilising Perl itself - there are many such routes, including reading the Camel book, reading much of PerlMonks, and studying the source code of Perl itself!

And so patience is required because the road is long.. take some initial steps and read as much as you can.


In reply to Re: Efficient programming by monarch
in thread Efficient programming by perlthirst

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.