- or download this
#!/usr/bin/perl
use Getopt::Long;
...
foreach $opt (keys %options) {
print "$opt is $options{$opt}\n" if $options{$opt};
}
- or download this
nkuvu$ perl try.pl --i h --o=foo
h is still in ARGV
o is foo
i is 1
- or download this
GetOptions(
#whatever
);
die "Gah! (with appropriate error message here)\n" if (@ARGV);