in reply to Re: older files
in thread older files

i tried that and it's not worked for me. I don't know why. I got the solution using the below way. Thanks for the reply.
my $mtime = (stat "$temp1") [9]; my $older=60*60*24; my $diff=$today-$mtime; $diff=$diff/$older; print " DIFF $diff "; if ($diff >3)

Replies are listed 'Best First'.
Re^3: older files
by derby (Abbot) on Aug 04, 2009 at 11:16 UTC

    No need for the date calculation, the -M operator already does that for you:

    print "Old\n" if -M $temp1 > 3;
    -derby