#!/usr/bin/perl -w use strict; use warnings; # Basic wrapper for monitoring a file with 'tail -f'. open TAIL, "tail -f $ARGV[0] |" or die "Failed to pipe to 'tail -f $ARGV[0]'. $!"; while () { if (/\Q$ARGV[1]\E/) { print; } }