Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by bikeNomad (Priest)
on Jul 02, 2001 at 22:20 UTC ( [id://93266]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $filename = $directory . '/' . time() . '.ext';
    
  2. or download this
    my @lt = localtime(time);
    my $filename = sprintf "%s/%04d%02d%02d%02d%02d%02d", $directory, $lt[
    +5]+1900, $lt[4]+1, @lt[3,2,1,0];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://93266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found