in reply to Death of sleep?
Your code works if you set $|=1; before LOOP. That autoflushes the prints rather than waiting till STDOUT is closed ( too late then ;-).
After Compline,Zaxo