Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Deleting old files from directory

by Anonymous Monk
on Sep 27, 2011 at 20:03 UTC ( #928167=note: print w/replies, xml ) Need Help??


in reply to Re: Deleting old files from directory
in thread Deleting old files from directory

this is what you mean?
foreach (grep {-f $_ and 10 < -M _ } @files) { print "\n Deleting::: $_\n"; unlink $_; }

Replies are listed 'Best First'.
Re^3: Deleting old files from directory
by Anonymous Monk on Sep 27, 2011 at 20:24 UTC

    Almost

    Simply replace EXISTING grep block with mine, no need to change anything else

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928167]
help
Chatterbox?
[Your Mother]: Don't think so.
[Your Mother]: Windows doesn't even recognize them as far as that goes.
[Lady_Aleena]: Your Mother, thanks. I had a feeling it would be no.
[Your Mother]: :P
[Lady_Aleena]: Your Mother, it is a good thing I am no on Windows.
[Lady_Aleena]: s/no/not/;
[Lady_Aleena]: My blasted web host will not put perl 5.22 in /usr/bin/perl, it is in /usr/local/cpanel/ 3rdparty/bin/perl
Lady_Aleena has been banging her head against this wall for years now with no success on breaking the wall.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-04-28 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (519 votes). Check out past polls.