#!/usr/local/bin/perl -w use strict; use Getopt::Std; my $opt_u = 0; getopt('u') || die "can't do getopt\n"; print "username is $opt_u\n"; #### #!/usr/bin/perl -w use strict; use Getopt::Std; $Getopt::Std::opt_u = 0; getopt('u'); print "username is $Getopt::Std::opt_u\n";