in reply to How to subtract month without using module?

try searching, you'll find perldoc -f  localtime
(localtime)

So you'll probably want to do something like this:
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t +ime); $year += 1900; $mon++; # month = 0 based; if ($mon <= 6){ $mon += 6; $year -=1; }else { $mon -= 6; } print "the date minus 6 months = \" $mday - $mon - $year \"\n";
But if you want it more exactly, you'll have to count each day in a mont, and do a more secure substraction.

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.