Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use Time::HiRes; # grab the current time my @now = localtime(); # rearrange the following to suit your stamping needs. # it currently generates YYYYMMDDhhmmss my $timeStamp = sprintf("%04d%02d%02d%02d%02d%02d", $now[5]+1900, $now[4]+1, $now[3], $now[2], $now[1], $now[0]); # insert stamp into constant portion of file name. # the constant portion of the name could be included # in the sprintf() above. my $fileName = "simplebr_$timeStamp.txt"; print "$fileName";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Log Files for CGI Submits
by AltBlue (Chaplain) on Jul 23, 2008 at 21:06 UTC | |
|
Re: Log Files for CGI Submits
by pjotrik (Friar) on Jul 23, 2008 at 20:02 UTC | |
|
Re: Log Files for CGI Submits
by olus (Curate) on Jul 23, 2008 at 20:33 UTC | |
|
Re: Log Files for CGI Submits
by igelkott (Priest) on Jul 26, 2008 at 20:04 UTC | |
|
Re: Log Files for CGI Submits
by Lawliet (Curate) on Jul 23, 2008 at 20:00 UTC | |
by Fletch (Bishop) on Jul 23, 2008 at 20:02 UTC |