in reply to Print the output from the pipe while waiting

this could be because of buffering. (perl actually does not send one line at a time; it waits for more FIRST unless you tell it differently).

There is a very excellent and easy to understand explanation at: http://perl.plover.com/FAQs/Buffering.html

Probably what you want is:

use IO::Handle;
STDOUT->autoflush;

But do read the FAQ and all will become clear.
  • Comment on Re: Print the output from the pipe while waiting