Title: Blank
    use somehting like:

my ($mday, $mon, $year) = (localtime(time))[3..5];    # pull day,month, year only
$year += 1900;                                                         # want 4 digit date
$mon++;                                                                   # need to add 1 to month(runs from 0 to 11)

my $MyDirectory = sprintf "%04d%02d%02d", $year, $mon, $mday

This will yyyymmdd format.

Wags ;)

-----Original Message-----
From: Mark Richmond [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 13:20
To: [EMAIL PROTECTED]
Subject: Dates in file or directory names ?

Ok, so I'm confused
 
What I want to do is create a directory where the name is the current date say mkdir(2002131); 
What Can't figure out is how to build the date string. I'm sure I'm just missing something.
Any thoughts.
 
    -regards
    -mark

-
Mark Richmond <[EMAIL PROTECTED]>
Airvana Inc.
25 Industrial Ave.
Chelmsford, MA 01824
Voice: 978-250-2669
Fax:   978-250-3910

 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to