Home: General Discussions: General Questions:
rmdir of File::Path with keep_root => 1 is not working in LINUX



mathewhai
New User

Feb 12, 2010, 5:49 AM


Views: 7597
rmdir of File::Path with keep_root => 1 is not working in LINUX

Hi,
I want to delete the subdirectories under a parent directory. I used rmdir of the File::Path module with the option keep_root => 1. But the parent directory also got deleted in LINUX. In Windows the same code works fine.
How can I delete only the sub directories in Linux using perl?
Any inputs are welcome

Code
rmtree("/user/mathew/sop",{keep_root => 1}); 
sop folder also got deleted.