Well "efficient" is subjective here I think.
Does he mean "wins when you
Benchmark"?
Or does he mean "least number of bytes of
source to accomplish a task"? Or perhaps even
"the most elegant and understandable solution"?
All of which are laudable goals, at different
times and for different reasons, which may of
course have conflicting solutions. Though yes,
in general the first definition is what is
intended. Just some rambling thoughts...
UPDATE:
Just wanted to expand on this, when I first started
I focused primarily on the second form. For
three reasons a) I had a small disk quota
b) I did not know how to optimize for the first
(and still am not great at it) c) I thought this
was optimizing for the first. I figured "the
smaller the source the less in memory, the less to
handle etc. etc." Which is all of course mostly
irrelevant. Insert bit about premature optimization
here. Thought this might be some interesting
background into how some approach things.
--
perl -pe "s/\b;([st])/'\1/mg"
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.