in reply to Comparing time and date stamps

See POSIX::strftime :

use POSIX qw(strftime); print strftime '%Y-%m-%d-%H-%M-%S', localtime;

Also be aware that not all filesystems support a ":" in the filename and many Unix utilities use the ":" as a delimiter in lists of directories which may lead to unexpected failures.