RE: convert ctime to a string

2002-02-15 Thread Bob Showalter
> -Original Message- > From: Dermot Paikkos [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 15, 2002 11:06 AM > To: [EMAIL PROTECTED] > Subject: convert ctime to a string > > > Hi Gurus, > > SYS stuff: perl 5.005 on TRU64 UNIX or >

Re: convert ctime to a string

2002-02-15 Thread walter valenti
Dermot Paikkos wrote: >That has worked a treat. >2 more Qs. > >1) Do we summarize solutions and send them to the mail list? > Why no ??? > > >2) What do they call that method of getting variable for a module? > localtime is UNIX time, adapted for zone time, sec,min,hour, methods are obvious. d

Re: convert ctime to a string

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Brett W. McCoy wrote: > > Does anyone know how to either get the ctime as a string or convert > > the interger into a date that is meaning full?? > > Sure: > > my @stats = stat($file); > > print "Create Time: ", scalar(localtime($stats[10])), "\n"; I'm sorry, that's not

Re: convert ctime to a string

2002-02-15 Thread walter valenti
use Time::localtime; sub tempo{ my $tm=localtime(); my $h=$tm->hour; my $m=$tm->min; my $s=$tm->sec; my $md=$tm->mday; ##giorno my $me=$tm->mon+1; ##mese my $y=$tm->year+1900; return "$h:$m:$s [$md/$me/$y] "; } Walter >Hi Gurus, > > SYS stuff: perl 5

Re: convert ctime to a string

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Dermot Paikkos wrote: > Does anyone know how to either get the ctime as a string or convert > the interger into a date that is meaning full?? Sure: my @stats = stat($file); print "Create Time: ", scalar(localtime($stats[10])), "\n"; See perldoc -f localtime -- Brett

convert ctime to a string

2002-02-15 Thread Dermot Paikkos
Hi Gurus, SYS stuff: perl 5.005 on TRU64 UNIX or activeperl 5.6 on Win32. I am getting a file listing and want to get the ctime (create time) for each file. My understanding is that ctime is stored in stat[10] but this is returning a interger such as 91070454. I was h