> I am still very much the newbie, but to my untrained mind,
> this completely blows away getopts.
Getopt is a lot more flexible than the -s switch. I agree that -s is
fine for basic stuff, but for more complicated command-line parsing (like
switch bundling, or forcing a mandatory datatype), you
I don't know if this will help at all, but I just found out, myself,
about the -s option.
If you run your script with:
#!/usr/bin/perl -s
and remember, to keep strict happy, to:
use vars qw($all_the $variables $you_need $from_stdin);
You can run your script like this:
bash-2.03$ script.pl -varia
On Thu, 17 May 2001, Craig Moynes/Markham/IBM wrote:
> I tried using the getopts, and getopt but I can't seem to have mandatory
> parameters with optional parameters.
> I have something like this for my usage
> perl scp_logs.pl -u username -h hostname -l local_directory [-r
> remote_directory]
S
--- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote:
> I tried using the getopts, and getopt but I can't seem to have
> mandatory parameters with optional parameters.
> I have something like this for my usage
> perl scp_logs.pl -u username -h hostname -l local_directory [-r
> remote_directory]