Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Aging Script

by suaveant (Parson)
on Aug 08, 2001 at 22:27 UTC ( #103152=note: print w/replies, xml ) Need Help??


in reply to Aging Script

try this...
$cutoff = time() - 31*24*60*60; while(</dir/to/read/*>) { unlink $_ if (stat $_)[10] < $cutoff; }
that should work... maybe replace unlink with print to test it first ;)

                - Ant
                - Some of my best work - Fish Dinner

Replies are listed 'Best First'.
Re: Re: Aging Script
by Seema (Novice) on Aug 09, 2001 at 01:16 UTC
    Suaveant..
    Thanx, that helped out. The script runs fine!
    ~Seema

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-12-08 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?