in reply to Date and time for log files
Personally, I like to throw in a little punctuation, because it's easier to look at, and it can be easier to grep for a given day or a given hour:use POSIX; my $filename = strftime( "%Y%m%d%H%M%S.log", localtime ); print "lets open a file called $filename ...\n";
strftime( "%Y%m%d_%H%M%S.log", localtime );
|
|---|