in reply to printing loops on the fly

Have you got $|=1; in your program? This unbuffers STDOUT. Please see perlvar for more details.

--
bowling trophy thieves, die!