Front page | perl.beginners |
Postings from March 2008
Re: Handling OLD files
Thread Previous
|
Thread Next
From:
Santosh Patil`
Date:
March 28, 2008 05:20
Subject:
Re: Handling OLD files
below peace of code u list of files, sorted according the date ""
@lfiles = grep {stat($_)->mtime() < $date} @files;
================================================
On Fri, Mar 28, 2008 at 5:08 PM, Robert (bloo) <
i.have.no.real.name@gmail.com> wrote:
> Sandy wrote:
> > On Mar 27, 1:40 pm, anders.u.pers...@gmail.com (Anders) wrote:
> >
> >> I am looking for a way of moving files older than a date,
> >> I am need this in a script for moving/erase old files from a
> >> production machine
> >>
> >
> > Try using File::Find
> > http://search.cpan.org/~nwclark/perl-5.8.7/lib/File/Find.pm<http://search.cpan.org/%7Enwclark/perl-5.8.7/lib/File/Find.pm>
> >
> > /sandy
> > http://myperlquiz.com/
> >
> >
> >
> Or, you could use the built in "stat" function. It can get a lot of
> information on a file.
>
> perldoc -f stat
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>
--
Regards
Santosh Patil
Thread Previous
|
Thread Next