in reply to Finding Timestamp

use Time::Local; my $midnight_time = timelocal(0,0,0, (localtime)[3,4,5] ); print scalar localtime $midnight_time;
See Time::Local - timelocal expects 6 parameters in the same order as localtime returns them. The first three represent the current time of day; you just pass zeroes instead.

Makeshifts last the longest.