in reply to File manipulation
For example: pick a date, what was date before that? If you picked Jan 15 then the answer is Jan 14, no matter what year. But what if you picked March 1?
However, by taking advantage of epoch seconds, you can easily figure out what yesterday was:
my $yesterday = time - (60 * 60 * 24); my ($d, $m, $y) = (localtime($yesterday))[3,4,5]; $yesterday = sprintf("%04d/%02d/%02d", $y += 1900, $m += 1, $d);
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|