use warnings; use strict; use Getopt::Long; my @in; GetOptions('input=s', \@in) or die; die "Error: cant have multiple inputs" if @in > 1; print "input = @in\n";
UPDATE: There is another solution at: http://stackoverflow.com/questions/10045067/can-getoptlong-getoptions-generate-an-error-if-the-same-option-occurs-multiple
In reply to Re: getopts and duplicit params
by toolic
in thread getopts and duplicit params
by cOreey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |