use IO::Handle; open PORT, ...; PORT->autoflush;