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'"
In reply to Re: name the file with current date and time
by Corion
in thread problem with naming the file with current date and time
by Arbariya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |