use IO::Handle; open(WRITE, ">>C:\\File\\test.dat"); WRITE->autoflush(1);