The command line arguments for your script live in the array @ARGV:
#!/usr/bin/perl -w if (!@ARGV) { print STDERR << "SYNTAX"; myprogram [option][filename] -x does something -y does something else SYNTAX exit 1; }
Also, take a look at the Getopt::Std module to handle your switch processing.
-Matt
In reply to RE: No arguments or filenames
by DrManhattan
in thread No arguments or filenames
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |