-r foo bar baz -b dog cat -t pony
it will put foo in @releases,
dog in $buildtype, pony
in $target, and leave the rest in @ARGV.
use Getopt::Long;
our @releases;
GetOptions(
't=s' => \ our $target,
'b=s' => \ our $buildtype,
'r=s' => \ @releases
);
print "Target: $target\n";
print "Buildtype: $buildtype\n";
print "Releases: @releases\n";
print "ARGV: @ARGV\n";
__END__
Target: pony
Buildtype: dog
Releases: foo
ARGV: bar baz cat
Not at all as wished.
I don't know any module that will parse the command line
as was wished, but it shouldn't be too hard to roll your own.
Abigail |