Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Favourite One-liners?

by radiantmatrix (Parson)
on Jun 28, 2005 at 21:09 UTC ( #470824=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -pe 'next if /^(\s*)#/' file.conf > clean-file.conf"
    
  2. or download this
    perl -e "for(glob '*.xls'){$o=$_; s/(\.xls)$/.old$1/i;rename $o,$_}"
    
  3. or download this
    perl -e "for(glob '*'){next unless -f;@s=stat;unlink($_) if (time-$s[9
    +])>60*60*48;}"
    
  4. or download this
    perl -MFile::Find -e "find(sub{@s=stat;unlink if (time-$s[9])>60*60*48
    + && -f},'.')";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2014-10-01 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (38 votes), past polls