$foo and $bar would have done just as well, but after overexposure to Perl Golf, I'm tending to use shorter names anyway. $x and $y perhaps? Recently I was having trouble when I called a variable in a C++ structure "errno". Collisions occur in many languages.

The "only way to fly" comment is about clarity of programming, not about the way to code. TMTOWTDI is always assumed, of course. IO::Handle's methods do seem to be the clearest from the point of maintenance and understanding, but I'm not advocating that you must use IO::Handle. I am advocating that people create code that works and makes sense.

In reply to Re^8: Determining what line a filehandle is on by tadman
in thread Determining what line a filehandle is on by Anonymous Monk

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.