Help for this page

Select Code to Download


  1. or download this
    my @months = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC);
    
    ...
    }
    
    # And very similarly for subtract month
    
  2. or download this
    my %month_nums;
    for (my $i = 0; $i <= $#months; $i++) {
    ...
        my $month = shift;
        return $month_nums{$month} + 1;
    }