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

Re: Aging Script

by arturo (Vicar)
on Aug 08, 2001 at 22:19 UTC ( #103146=note: print w/replies, xml ) Need Help??

in reply to Aging Script

Perl makes this sort of thing very easy to do. If you want to delete all files that are older than 31 days, you need to read up on the stat function -- specifically, subtract the "ctime" of the file from the current timestamp and see if it's greater than (24 * 60 * 60 * 31). Also, read up on unlink, and possibly File::Find.


perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Replies are listed 'Best First'.
Re: Re: Aging Script
by Seema (Novice) on Aug 09, 2001 at 01:20 UTC
    Hey arturo...
    I read the stat function, unlink, and File::Find. They really helped out. Thanx for helping me out!

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-12-07 22:29 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (33 votes). Check out past polls.