use Getopt::Std; our($opt_p); getopt('p'); my $arg = $opt_p; getopts('p'); my $switch = $opt_p; print "Switch is $switch and arg is $arg\n"; #### >perl stuff.pl Switch is and arg is # Okay so far... >perl stuff.pl -p Switch is and arg is # No, switch should equal 1... >perl stuff.pl -p http://www.proxy.com Switch is http://www.proxy.com and arg is http://www.proxy.com # Shouldn't switch equal 1 here too?