C:\>type getopt.pl use Getopt::Std; our($opt_p); getopt('p'); print "Using the getopt() method \$opt_p is "; print defined $opt_p ? "'$opt_p'" : "undefined"; C:\>perl getopt.pl Using the getopt() method $opt_p is undefined C:\>perl getopt.pl -p Using the getopt() method $opt_p is undefined C:\>perl getopt.pl -p123 Using the getopt() method $opt_p is '123'