#!/usr/bin/perl use strict; use warnings; open my $FH, 'tail -f t |' or die; while (<$FH>) { chomp; # processing goes here.... }