Do you mean it changed the hask key to octal?

No. Hash keys and filenames are strings, not numbers, so the leading zero does nothing in those cases and has no impact on your program. (Quite aside from that, you also have only one digit after the zero, so these numbers would be the same in octal as in decimal, except for 08 and 09, which aren't even valid in octal and would therefore still be interpreted as decimal, so there's another reason it has no impact.) He was just making you aware for future reference that if you have something like '024' and then treat it like a number (e.g., by adding another number to it), the results may not be quite what you might expect. That's probably why he called it a "small thing", because it doesn't have any impact on the operation of your current program.


Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. You can just call me "Mister Sanity". Why, I've got so much sanity it's driving me crazy.

In reply to Re: Perl Hash Files by jonadab
in thread Perl Hash Files by blundell

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.