scratchpad
nimdokk
<code>
#!/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 (<TAIL>) {
if (/\Q$ARGV[1]\E/) {
print;
}
}
</code>