in reply to ARGV issue
You have a couple mistakes.
my($#ARGV) = @_; makes no sense.
$arg contains a number, so it'll never be equal to any of the strings to which you compare it. You would need to loop over @ARGV.
I'd use Getopt::Long.
use Getopt::Long qw( GetOptions ); sub usage { print STDERR "...simple usage...\n"; exit(1); } sub help { print "...more extensive help...\n"; exit(0); } GetOptions( 'h|?|help' => \&help, ... ) or usage();
You might also find Pod::Usage of interest.
|
|---|