in reply to How to subtract month without using module?

my ($month, $year) = (localtime())[4]; print $month;