As I see it, offering different approaches are very valuable, not only to the OP, but to all monks, and potential Super Searchers. If there are already replies on the OP's question, I think you're allowed to skip giving the specific answer to the question, and jump straight to the alternative way. Heck, we are discussing Perl, so there must be at least one other way to do something (be it better or worse). I think you could even add something like "[monk] suggested yada yada yada, but you can also do it like this ...", but if the "right" solution is already explained three times, because the monks all started typing right off, I think you can even skip that.

Some thing I'd like to draw the attention to, is the use of non-Perl solutions. Is that acceptable? Take for example this node about merging three files. This can easilly be done by the use of nl, join and paste (GNU tools), as I described in my reply. It produces the output the OP wanted and in this specific case, I think the OP only wanted to see the result. My reply started out with 2 downvotes and is currently at 2 plusvotes (so, 4 plus votes really). Is this type of replying thought of as added bonus (CombatSquirrel already posted his Perl solution), or is it redundant, and shouldn't it be posted at all? I am not sure.

--
b10m

In reply to Re: Answering questions and questioning questions by b10m
in thread Answering questions and questioning questions by talexb

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.