script --EndDate #outputs: Start = 0 and End = 9999999999
If you just want a default value, just init your variable, i.e.
my $End=999999999; GetOptions( ...
PS: Error descriptions like "my code fails" are not very useful. Please give us a bit more info HOW it is not working next time
In reply to Re: Getopt::Long with default
by jethro
in thread Getopt::Long with default
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |