#! perl -sw use strict; my $pid = open LOG, "tail -F theLog |" or die $!; $SIG{ INT } = sub{ close LOG; kill 3, $pid; exit; }; $SIG{ BREAK } = $SIG{ INT }; while( ) { print; }