in reply to Re: Getting commandline params
in thread Getting commandline params
Sadly, when run: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";
So, any input on how to get the desired behaviour, or maybe I shouldn't be going about it like this anyway?>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 # Shou +ldn't switch equal 1 here too?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Getting commandline params
by tachyon (Chancellor) on Sep 02, 2001 at 16:09 UTC |