in reply to unlink and rmdir
use File::Path; rmtree($dir, 0, 1); [download]
system("/bin/rm -rf $dir"); [download]
`/bin/rm -rf $dir`; [download]