in reply to why the long delays?

You made sure your output isn't buffered ($|=1;), so that means the it must be one of the other programs that is buffering its output. ssh, tail and/or grep realize they are connected to a pipe and buffer their output as a result. You'll need to convince the offender(s) that they are connected to a terminal via some command line option or by using a pseudo tty (ptty).

For my versions of tail, grep and ssh, I found that

Adding --line-buffered to grep should do the trick.

Update: Added "For my version" on.

Replies are listed 'Best First'.
Re^2: why the long delays?
by alager (Acolyte) on Apr 15, 2010 at 18:26 UTC
    Adding --line-buffered to grep **DID** do the trick. Thanks for the help.

    The reason I stuck with the shell grep instead of the perl grep was the ease of highlight on match.

    Aaron