in reply to making delays

Try unbuffering STDOUT:
#!/usr/bin/perl use strict; use warnings; $| = 1; # This is the critter you want print "hello,\n"; sleep 2; print "world!\n"; sleep 2; print "bye!\n";