John W. Krahn wrote: > Michael Gale wrote: > >>Hello, > > > Hello, > > >> I was reading online about getops and it seems that with getops the >>command line arguments have to be in the form: >> >>-character option >> >>What happens if you want your switchs to be characters like: >> >>--src_ip X.X.X.X >> >>Currently I have been using a for loop and going through ARGV with a >>regular expression to pick out the arguments. > > > You were probably looking at Getopts::Std but there is also > Getopts::Long and a few others on CPAN. > > perldoc Getopts::Long > > > John
I have an IMHO decent enough template online. It has served my purposes well in the past, http://danconia.org/cgi-bin/request?handler=Content;content=StaticPage;label=getopt_long_template And I think John probably means Getopt::Long (no 's'), and it is a standard module in newer Perl versions. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>