use File::Path; rmtree($dir, 0, 1); [download]
In reply to Re: unlink and rmdir by ysth in thread unlink and rmdir by jonnyfolk