I think you should have added a note about the solution already given. Had you linked to it or named its author, it would be even better. Your reaction to the root node was "Did you and Matt Wright go to school together?". You know the code that that Matt writes, and I do too. But some people have never heard of this scary script archive. A very simple explanation could have cleared up a lot.
You chose not to tell anything about the efficiency of the reply, not to link, and not mention the better approach at all (either through mentioning the solution itself (it's only 20 characters), or refering to another post), leaving only the harsh bit.
I agree: the iterating solution is inefficient and clumsy (although at 133k/s (Athlon 900), the efficiency loss is not even notable in non-benchmarking scripts), and there is a better solution to it. I also think the author should have been told about it. I like your sarcastic approach, but it should be complemented with something else. The something else could have been a small reference to the "right WTDI", or an explanation of why the code is so much like Matt Wright's code and why that is bad.
Probably, some remember similar harsh posts from me, and I admit I have often been wrong in the same way. I will not retract those rude unhelping posts, but I will try to avoid them in the future. I hope you will too.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||