in reply to getopts and duplicit params
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
|
|---|