Aw, shucks... I didn't meen to make you feel stupid.

And if you're using a perl editor that can tell you when you make a mistake by 'misnaming' an undefined variable, lemme know what it is, I'd like to use it. My most common coding mistake is failing to type var names correctly.
One could argue that I should use simpler var names or put all vars and their description at the top of the closure, but while I've never been known as a lazy documenter, I usually only add comments to my code when I'm doing something that is odd or to explain a funky regex.

And strict is something you want to use always. Among other things, it forces you to declare your variable names before using them.

It'll save you time when you debug during development.

As for -w, well once you understand why you should use it, then you know when you can not use it. IMHO, all people in the early stages of perl should use warnings. Once you become more experienced you prolly wont use it as much, if at all.

$0.02 doesn't go as far as it used to, does it?


In reply to Re: Re: Re: Can't get the right array value by XPWhore
in thread Can't get the right array value by DaWolf

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.