There's more than one way to do things | |
PerlMonks |
Re: Feed ARGV into one-linerby Krambambuli (Curate) |
on Jan 22, 2010 at 16:52 UTC ( [id://819000]=note: print w/replies, xml ) | Need Help?? |
A bit OT to your direct question, but just as an idea: it's sometimes useful and easy to also use the shell as a helper. You could write a shell script vet.sh containing perl -ne 'print $_ if /'$1'/' $2 which invoked as ./vet.sh Vet Test.txt would also do what you asked for. As a side benefit, your oneliner is written down - just in the case you do not remember it well a week later when you need it again. :) Krambambuli ---
In Section
Seekers of Perl Wisdom
|
|