in reply to Auto-restarting script if it dies
Try setting your STDOUT buffer to autoflush. I didn't try your exact implementation, but that looks like the problem to me.
$| = 1;
In Section
Seekers of Perl Wisdom
in reply to Auto-restarting script if it dies
$| = 1;