Hi,
I have a perl program that keeps running on server. it creates a temp directory and this directory is supposed to be deleted after the it is done with its job. I am deleting the temp dir using rmtree() function. rmtree works well for initial 10-12 jobs after that it fails to delete the temp folder with the error - "failed to fetch initial working directory". Any help is appreciated.
code:
if(-e $tempDir)
{
File::Path::rmtree($tempDir,0,0);
}