http://qs1969.pair.com?node_id=358280

#!/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 $AR +GV[0]'. $!"; while (<TAIL>) { if (/\Q$ARGV[1]\E/) { print; } }