in reply to getopts and duplicit params

One way, using Getopt::Long, is to use an array and to die if the array has more than one element:
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