perl -MIO::Handle -e ' STDOUT->autoflush(1); print 1; sleep 1; print 2 '