Saved has asked for the wisdom of the Perl Monks concerning the following question:
But my code fails. All help much appreciated.: number [ desttype ] Like :i , but if the value is omitted, the number will be assigned.
Thanx UPDATE: Sorry, the failure was the variables were not set. NetWallah's example showed me how to get it to work. I assumed just typing the script name would work, but when I addedGetOptions( "h|?"=>\$hflag, "Action=s"=>\$Action, "StartDate:0000000000"=>\$Start, "EndDate:9999999999"=>\$End ); print "Start = $Start and End = $End\n";
The -s and -e , it worked fine ThanxParseLdapAudLog.pl -s -e
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getopt::Long with default
by jethro (Monsignor) on Aug 27, 2012 at 14:09 UTC | |
|
Re: Getopt::Long with default
by NetWallah (Canon) on Aug 27, 2012 at 14:09 UTC | |
|
Re: Getopt::Long with default
by daxim (Curate) on Aug 27, 2012 at 14:44 UTC |