in reply to perl command line arguments

Not really a switch, but what about BEGIN? This should work, the first param is the argument.
perl-ne 'BEGIN {$arg = shift} split(/,/);if ($_[7] eq $arg){$cnt++;}EN +D{print "There are $cnt things in this file\n";}' arg file_name.txt
Boris

Replies are listed 'Best First'.
Re^2: perl command line arguments
by jluther (Novice) on Jul 26, 2004 at 22:15 UTC
    Thanks!! I've been on vacation so I am just trying these out. This seems to be the most intuitive. jluther