in reply to
First time using Args
A couple of other remarks:
You go to a lot of trouble to validate and then open the input file given on the command line, but then you never actually read from the said file...
- You increment month by 1 in this line:
$month = sprintf("%02d", $month+1);
but, as you have already added 60 days, this will add a further 30 (or 31, or 28, or whatever).
- In fact, assuming that you don't want to increment month, that whole chunk of code (four lines) could be simplified to:
my $deadline = sprintf '%d-%02d-%02d 00:00:00', Add_Delta_Days( Today, 60 );