in reply to custom args with perl -an type invocation?
# With Perl's -s switch $ ./anWithArgs.pl -type=letters input.txt $ cat anWithArgs.pl #!/usr/bin/perl -sn if ( $type eq 'letters' ) { print if /[[:alpha:]]/; } elsif ( $type eq 'numbers' ) { print if /\d/; } else { print "bad type: $type" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: custom args with perl -an type invocation?
by tphyahoo (Vicar) on Jun 28, 2006 at 12:14 UTC |