http://qs321.pair.com?node_id=656794


in reply to How to subtract date by 1 day

Subtract 24*60*60 seconds from the unix time before using localtime to split into units.

I recommend POSIX::strftime for converting that to a string.

use POSIX 'strftime'; print strftime "%Y_%m_%d_%H_%M_%S/n", localtime() - 24 * 60 * 60;
prints this time yesterday in your format.

After Compline,
Zaxo