This will give you the previous day (and roll back the month if today is the 1st).#!/usr/bin/perl use strict; use warnings; use POSIX 'strftime'; my @date = (localtime)[0 .. 5]; $date[3]--; print strftime "%Y-%m-%d", @date;
In reply to Re: Date function
by Cristoforo
in thread Date function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |