I would like to be able to make a command line argument optional. i.e. the script will run whether the arg is there or not and if its not, check the modification date of a file and if its a week old, run a certain sub. So, can i do something like:
$arg = shift || die "takes one arg" unless -M $file >7;
TIA - Joe.
In reply to shift or die unless by joec_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |