Here you go. Sometimes you just have to give them what they want.
my $SECS_IN_A_DAY = 86400; # 60 secs * 60 mins * 24 hrs my ($day, $month, $year) = (localtime(time-$SECS_IN_A_DAY))[3..5]; $month++; $year += 1900; # $month = "0".$month if (length($month) == 1); # for dd-mm-yyyy.txt f +iles. # $day = "0".$day if (length($day) == 1); # for dd-mm-yyyy.txt files. print "File is $day-$month-$year.txt\n";
In reply to Re: How to find yesterdays date (was: Date)
by DeaconBlues
in thread How to find yesterdays date (was: Date)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |