Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recursive directory removal question 1

Status
Not open for further replies.

varakal

IS-IT--Management
Mar 18, 2004
114
US
I need to remove directories recursively. I was wondering if there is any perl function equivalent to unix function 'rm -r directory_name'. rmdir function removes a directory only when it is empty. If there anyway that I can force the directory and all contents in it to get deleted. I can have a loop running through the directories to remove each one of them, but that would be second option I will attempt only if there is no direct function or module equivalent to 'rm -r'.

Thanks.
 
File::Remove is exactly what I am looking for. Thanks Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top