> -----Original Message-----
> From: LinkS On WeB [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 13, 2002 4:54 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Perl Help
> 
> 
> using the stat function, say I was using $stat[9],
> which displays the time of the file, how would I make
> it just display the date. Month-DayofMonth-Year

Pass the time from stat() to localtime(). This will break
out the separate month, day, and year components. You can
format these with sprintf() (or POSIX::strftime() for more
elaborate formatting possibilities).

Carefully read

   perldoc -f localtime

to get the details on the various fields returned.

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

Reply via email to