That is too funny... and proves once again that no matter how good a programmer you are you can always manage hacks to do the thing you want and rationalize it.

I hope he's never had to divide by ten to get the proper length of a string in Java... and it really ought to make sense that you don't have to do it in Perl as well.

I've had my fair share of goof ups myself. I remember back when I was writing VAX assembly I had several routines that I made more efficient by using side effects of instructions... when parts of the system got updated I had basically shot myself in the foot because I didn't no idea why the code was not working.

And doesn't Hall & Schwartz in "Effective Perl Programming" say something like 'Never take anything for granted'... if you can't see an obvious explanation for why something works don't try and make something up to explain it away... figure out what the real reason is.


In reply to RE: There's more than one way to do it . . . by accident by gaspodethewonderdog
in thread There's more than one way to do it . . . by accident by Ovid

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.