In fact, the issuance of warnings might (well, not likely, but "might") cause my not-entirely-hypothetical idiot to actually read the prompt, once that's written in a manner which makes the required input explicit.

This largely depends on the user audience. Some Perl I write is customer-facing and warnings from the interpreter (be it Perl, Python, or extra debugging printf or println statements in C or Java) are very frowned upon when you're writing code customers will use. Techniques like defensive programming and encapsulating errors really does make a difference when you're writing well-designed, professional code. Granted not all projects require such attention and polishing, so perhaps this was what you were getting at.

I take a fairly strict approach to untrusted input in that it needs to be correctly validated, and I know my audience might not even care to read a line of Perl to use my program. Cluttering the screen of someone who may have simply made a typo with technical jargon (as much as it helps those of us who write Perl) does not increase usability if the error message is well-written, and in fact decreases usability by cluttering the screen with information not all users will be able to understand. If more direct description is required, the error message handling such bad input should be improved.


In reply to Re^4: Validation of UserInput is a positive Integer or not? by Apero
in thread Validation of UserInput is a positive Integer or not? by G Nagasri Varma

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.