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..."
In reply to Re: Local(*FILE);
by clintp
in thread Local(*FILE);
by theguvnor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |