use Getopt::Long; GetOptions( "ot:s" => \$ot ) or die("Error in command line arguments\n"); #### myprog.pl -ot=123 arg1 arg2 ... #### myprog.pl -ot arg1 arg2 ...
## myprog.pl -ot=123 arg1 arg2 ... ##
## myprog.pl -ot arg1 arg2 ...