develooper Front page | perl.beginners | Postings from December 2002

RE: file time

Thread Previous
From:
Paul Kraus
Date:
December 11, 2002 08:58
Subject:
RE: file time
Message ID:
022101c2a136$79d98680$64fea8c0@pkrausxp
stat array
----------
1. dev
2. ino
3. mode
4. nlink
5. uid
6. gid
7. rdev
8. size
9. atime
10.mtime
11.ctime
12.blksize
13.blocks

@array = stat(filename);

print "$arary[10]"; #prints mtime.

Buy learning perl and programming perl. Worth every single penny.

> -----Original Message-----
> From: Jerry Preston [mailto:g-preston1@ti.com] 
> Sent: Wednesday, December 11, 2002 10:52 AM
> To: Beginners Perl
> Subject: file time
> 
> 
> Hi!
> 
> I am trying to get the current file time by the following:
> 
>       $file_datetime = ctime( stat( "$file_name" )->mtime );
> 
> All I get is the time that the file was created.  What am I 
> doing wrong?
> 
> Thanks,
> 
> Jerry
> 
> 


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About