in reply to problem with naming the file with current date and time

In the CB I already mentioned the modules POSIX, DateTime and Time::Piece to you, all of which supply the strftime function. What problem do you have that is not solved by the strftime function?

Example code:

use strict; use POSIX qw(strftime); my $filename = strftime "foo.%Y%m%d-%H%M%S.txt", localtime; print "A good filename could be '$filename'"