> Getopt::Std only works with single hyphen switches, the only 
> exceptions being '--', '--help' and '--version'.
> 
> perldoc Getopt::Std
> 
> 
> Getopt::Std also processes swithes in clusters so "-abcd 
> filename" is the same as "-a -b -c -d filename".
> 
> 
> With your command line:
> 
> ./mytest.pl -h localhost -l file --volgroups foo bar
> 
> First the '-h' switch is processed and 'localhost' is 
> assigned to $opt_h.
> Next the '-l' switch is processed and 'file' is assigned to 
> $opt_l.  Next the cluster '--volgroups' is processed as the 
> switches '-"-"', '-v', '-o' and '-l'
> and since '-l' takes a value the remaining string 'groups' is 
> assigned to $opt_l overwriting the previous value in $opt_l.
> 
> 
> 
> 
> John
> --


Ahhh.... I see.

Thanks for the clarification, John!

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to