Sorry for jumping in late, but I've been away for a while... just saw this today.

Doesn't your request assume two things?

1.) First, that there's some universal definition of 'correct' that we all can agree on?

There are plenty of 'correct' answers that don't work in some situations, and there are occasionally 'wrong' answers that work fine...

Some people believe that 'correct' means it has to work under 'use strict', others don't... some believe that CPAN is your best friend, and use it a lot, some like to roll their own...

'Correct' is in the eyes of the philosopher... TIMTOWTDI is in the eyes of the Perl developer :)

2.) Aren't you also assuming that we come here only for answers, and not necessarily to learn?

I posted an answer once, using $#ARGV to check for number of arguments... It's just the way I learned to do it... It *worked*, and wasn't incorrect, but merlyn saw it and quickly pointed out that @ARGV was a much better way of doing what I suggested.

So guess what? Not only did the OP get a better answer, *I* learned something too.

So yeah, I posted an answer that would be considered 'wrong' by most standards... but the OP, myself, and anyone else who happens to view that thread later get to learn more than just the answer to the original question.

Trek

In reply to Re: To help not to misguide by TrekNoid
in thread To help not to misguide by c_chipster

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.