Perl - To print past 5 mins timestamp

hi ,
I would like to ask how to get past 5 minutes system time and date, if i have following to get current time.

# get current time
($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
$year = $year + 1900;
$mon = sprintf ("%02s",$mon+1);
$mday = sprintf ("%02s",$mday);
$hour = sprintf ("%02s",$hour);
$min = sprintf ("%02s",$min);
$sec = sprintf ("%02s",$sec);

print "$year-$mon-$mday $hour:$min:$sec>\n";

Thanks

time returns epoch seconds. There are 60 minutes in a second 60 * 5= 300

($sec,$min,$hour,$mday,$mon,$year, $junk) = localtime(time - 300);