jluther has asked for the wisdom of the Perl Monks concerning the following question:
Is there a switch that allows me to pass the argument "$arg" in to this command. This way I don't have to type this command all of the time. Thanks. jlutherperl -ne 'split(/,/);if ($_[7] eq $arg){$cnt++;}END{print "There a +re $arg things in this file\n";}' file_name.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl command line arguments
by borisz (Canon) on Jun 21, 2004 at 20:32 UTC | |
by jluther (Novice) on Jul 26, 2004 at 22:15 UTC | |
|
Re: perl command line arguments
by itub (Priest) on Jun 22, 2004 at 00:25 UTC | |
|
Re: perl command line arguments
by Fletch (Bishop) on Jun 21, 2004 at 20:39 UTC | |
by thor (Priest) on Jun 21, 2004 at 23:14 UTC | |
|
Re: perl command line arguments
by vladb (Vicar) on Jun 21, 2004 at 20:37 UTC | |
|
Re: perl command line arguments
by Roy Johnson (Monsignor) on Jun 22, 2004 at 00:07 UTC |