use POSIX 'strftime'; print strftime "%Y_%m_%d_%H_%M_%S/n", localtime() - 24 * 60 * 60;