use strict; use warnings; use POSIX 'strftime'; my $outfolder = strftime "Report_Output_%Y_%m_%d__%H_%M_%S", localtime(); print $outfolder;