![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: Re: Aging Scriptby OzzyOsbourne (Chaplain) |
on Aug 10, 2001 at 17:28 UTC ( #103864=note: print w/replies, xml ) | Need Help?? |
the 1st if statement here says if the user uses -h appended to the end of the script file, die an tell them how to run the command properly. the second part says: if it is not a number, die, otherwise set $agedays to $opt_d (the value of -d). Normally, I would run agecmd.pl -d90 By switching the two, you have made the d option the help option, and made the -h option the number of days. By not specifying -d, $agedays is then set to 60 by default, giving you no problems. By taking things out, and changing the code, it's hard to know what happened. Does you have problems if you run the original code with no mods? Can you post your new code?
In Section
Seekers of Perl Wisdom
|
|