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
In reply to Re: Feed ARGV into one-liner
by almut
in thread Feed ARGV into one-liner
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |