Re: Getting Date Stamp of a file on a Win32 System
- From: davidlamontadams@xxxxxxxxx (Dave Adams)
- Date: Fri, 29 Jul 2005 10:41:52 -0400
Robert,
Thanks very much. It works great. Your code was nice and simple.
Much appreciated.
DA
On 7/28/05, Robert <catcher@xxxxxxxxxxxxx> wrote:
> I found this maybe it will help:
>
>
> use strict;
> use File::stat;
> use POSIX qw(strftime);
>
>
> my $file = 'test.txt';
>
>
> my $s = stat($file) || die "Can't stat($file) $!\n";
>
>
> my $modtime = strftime('%Y-%m-%d', localtime($s->mtime));
>
>
> print "Modification time of $file is $modtime\n";
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail: beginners-help@xxxxxxxx
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
.
- Follow-Ups:
- Re: Getting Date Stamp of a file on a Win32 System
- From: Robert
- Re: Getting Date Stamp of a file on a Win32 System
- References:
- Getting Date Stamp of a file on a Win32 System
- From: Dave Adams
- Re: Getting Date Stamp of a file on a Win32 System
- From: Robert
- Getting Date Stamp of a file on a Win32 System
- Prev by Date: Re: defined on hash value does not work in my code :(
- Next by Date: Grep uniqueness issue
- Previous by thread: Re: Getting Date Stamp of a file on a Win32 System
- Next by thread: Re: Getting Date Stamp of a file on a Win32 System
- Index(es):