in reply to Feed ARGV into one-liner

You can use a BEGIN block to operate on @ARGV (the $v=shift below, shifting off the first arg) before the implicit while (<>) {} loop (behind -n) takes effect treating the remaining arguments as file names.

$ perl -n -a -e 'BEGIN {$v=shift} if (($_ = "$F[1]\n") =~ /$v/) { prin +t }' Vet TEST.txt

Replies are listed 'Best First'.
Re^2: Feed ARGV into one-liner
by Saved (Beadle) on Jan 21, 2010 at 14:55 UTC
    Thanx, that is great!