Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: create file with current date for name

by Masem (Monsignor)
on Aug 07, 2001 at 20:10 UTC ( #102832=note: print w/ replies, xml ) Need Help??


in reply to create file with current date for name

my $ymd = printf("%04d%02d%02d",$year+1900,$mon+1,$mday);
printf returns 1 if printing was successful, otherwise zero. Thus $ymd is 1; the print statement follows what printf has printed out.

Make that sprintf, and your problems are gone.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain


Comment on Re: create file with current date for name
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2015-07-03 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls