If anybody still cares to add to my understanding I'm always grateful.
FILEHANDLE style file handles are a built-in data type distinct from scalars, hashes, arrays, refs, formats etc. They're also always global (either really global, for the STD* handles, or package-bound).

$file_handle style handles are real variables and so they get the same scoping / semantics as any other variable, specifically:

1. local()izing a variable does NOT declare it. IOW, you still need to use our() in whatever scope(s) you use the variable, or use vars.

2. if you declare the $handle variable to be a lexical, you can't local()ize it either (you can try, but you'll be localizing the package variable of the same name instead).

3. strict throws an error if you use an undeclared non-automatic global/package variable.


In reply to Re: Localizing an indirect filehandle by Joost
in thread Localizing an indirect filehandle by whakka

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.