#!/usr/bin/perl my $sixmthb4= time() - ( 24 * 60 * 60 * 30.5 * 6); # assuming 30.5 days on avg. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($sixmthb4); print ("Month = ", $mon +1, " Day = $mday, Year = ",$year+1900,"\n");