in reply to Strange piece of code!

Others already explained what it does, now for a more readable alternative.

If you do not have time to change the FILEHANDLE to a lexical filehandle (or do not dare to make big changes) you can do this:

use IO::Handle; ERRFP->autoflush();

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^2: Strange piece of code!
by Anonymous Monk on Jul 26, 2012 at 20:13 UTC
    Well HANDLE->autoflush(1);

      Nope. The parameter is optional and the default is true: ... If no argument is given the previous value is unchanged (except for $io->autoflush will actually turn ON autoflush by default). - from perldoc IO::Handle

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.