Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Answer: How do I incorporate a timestamp into a file name?

by particle (Vicar)
on Jul 03, 2001 at 00:24 UTC ( #93313=categorized answer: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use POSIX;
    use constant DATETIME => strftime("%Y-%m-%d_%H-%M-%S", localtime);
    
  2. or download this
    my $tmpdir = $ENV{TMP} . '/' . basename $0 . '.' . DATETIME . '.' . $$
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2016-12-05 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (71 votes). Check out past polls.