The command is 

unlink <$_path/*> if -r $_path; 

This will work. 
HTH, 
-tir 

> Hi, I wanted to delete all files under a directory but not the directory 
> I tried this:
> my ($_path) = "c:/EventLogs/";
> unlink $_path if -r $_path;
> 
> But it didn't delete teh files which are under the directory Eventslogs
> Why?
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
 Tirthankar, IGIDR. 
 +91-22-8400919 x275 (r), x593(o), x(542), 
 +91-22-8421206 (r)
 http://www.igidr.ac.in/~tir

                                                           XVII
        Thou comest, much wept for: such a breeze
           Compell'd thy canvas, and my prayer
           Was as the whisper of an air
        To breathe thee over lonely seas.
-Tennyson, Lord Alfred. (In Memoriam A.H.H.)


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to