#!/usr/bin/perl sub addDate{ ($delt) = @_; my $date = time() + 60 * 60 * 24 * $delt; (undef,undef,$day,$month,$year) = localtime $date; $year += 1900; $month++; return sprintf "%d%02d%02d",$year,$day; } print addDate(0) . "/n"; print addDate() . "/n"; print addDate(128) . "/n"; print addDate(-1) . "/n";