http://www.perlmonks.org?node_id=138334


in reply to Local(*FILE);

As others pointed out, it's not an initialization and serves to protect the filehandle from stomping on other filehandles of the same name (in the surrounding scope).

Additionally it has another effect: when you leave that scope the filehandle is closed automagically:

use warnings; { local *T; open(T, ">foo") || die; print T "HALHGLAG\n"; # Works okay! } print T "Surprise!\n"; # warns "print() on closed file..."