in reply to create file with current date for name
printf returns 1 if printing was successful, otherwise zero. Thus $ymd is 1; the print statement follows what printf has printed out.my $ymd = printf("%04d%02d%02d",$year+1900,$mon+1,$mday);
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
|
---|
In Section
Seekers of Perl Wisdom