You don't need to local $| at all. After you open your filehandle, if you want to turn on autoflush for that filehandle, you need to do something like this:
my $oldhandle = select(FILEHANDLE); $|=1; select( $oldhandle );
Another option (probably better) is to look at FileHandle, which includes an autoflush() method.
In reply to Re: Do I need local $
by ehdonhon
in thread Do I need local $
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |