increment a date in perl - no cpan

need to increment a date in perl - but can't use cpan / non core modules - use and modify the below code

use Time::localtime;

sub date_increment
{

        my $tm = localtime;

        my $year = $tm->year+1900;
         my $month = $tm->mon+1;
        my $day = $tm->mday;

        my $increment  = '4';     # Number to increment by

        my @months = qw(Jan=31 Feb=28 Mar=31 Apr=30 May=31 Jun=30
                        Jul=31 Aug=31 Sep=30 Oct=31 Nov=30 Dec=31);  # Array of months and days
 
        my ($m, $mTotal) = split(/\=/, $months[$month-1]);   # Extracting initial months total days

        $day += $increment;                # Adding incremental value to start day
        while ($day > $mTotal) {   # Start of incrementing while loop
            $day -= $mTotal;        # Subtracts $mTotal from $day to increment month
           $month++;               # Increments month

           if ($month > ($#months+1)) {  # Checks if $month value is larger than 12
               $month -= ($#months+1);    # Subtracts 12 from the value of $month
              $year++;                   # Increments year value
           }
           ($m, $mTotal) = split(/\=/, $months[$month-1]);  # Extracts next months total days
         }

        $day   = sprintf("%02s", $day);      # Prepends value of $day with 0's if the total digits are < 2
        $month = sprintf("%02s", $month);    # Prepends value of $month with 0's if the total digits are < 2
         $year  = sprintf("%04s", $year);     # Prepends value of $year with 0's if the total digits are < 4

        return $year.$month.$day;   # new date
}    

Perl: checking command line arguments for basic sanity

Usage: ./your_script.pl 'path/to/file.txt'

Purpose: Check if argument has been supplied

# check files
if ( $ARGV[0] eq '')
{
   print "
###############
#    ERROR    #
 ###############
   
You have not specified an input file, please include the input file when you execute this script,
\n  
";
    exit;
}

Purpose: Check if file specifed in arguement exists

if (!-e $ARGV[0])
{   
    print " 
###############
#    ERROR    #
###############
 
The input file you specified does not exist.

";  
    exit;
}