Unbuffer output
use FileHandle; print "to STDOUT\n"; print STDERR "to STDERR\n"; STDOUT->autoflush(1); STDERR->autoflush(1); print "to STDOUT\n"; print STDERR "to STDERR\n";