You appear to have completely reversed the sense of my last paragraph. I was saying completely the opposite.

No, I think that it is very simple: you admit that there are cases where bareword filehandles are impossible to use (and you are quite correct). Now, (he asks) are there cases where lexical filehandles are impossible to use, and barewords are preferable? I assert that there are not.

Rather than switching back and forth in a dog's breakfast of filehandles, most programmers like to pick the cleanest, most flexible option to standardize on. Now if you change your code in the future from one of those "bareword ok" cases to a "bareword impossible" case, you don't have to alter every reference to the old filehandle.

Personally, the winning argument for me is that the scope of a lexical FH is lexically restricted. All things being totally equal, I will pick the option with the narrowest possible scope of effect.

I do agree with you that this matter has little to do with the actual question at hand. It is worth mentioning to beginners, though.


In reply to Re^9: Sub Return Value Help by fishbot_v2
in thread Sub Return Value Help 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.