# not so maintainable, but still used frequently select((select($fh), $|++)[0]); # better use IO::Handle; $fh->autoflush(1);