in reply to filehandles being recorded as CGItemp files

Andre,

The following is a quik-fix. While not kosher, it works
flawlessly. Better than spending a month looking for an
answer that isn't there. PERL could be a really good
language is there was so much crap it it.


sub DeleteTemp {
  $dirtoget="./";
  opendir(IMD, $dirtoget) || die("Cannot open directory");
  @thefiles= readdir(IMD);
  closedir(IMD);
  foreach $curname (@thefiles)
    {
      $temp = substr($curname,0,7);
      if ($temp eq "CGItemp"){unlink($curname)}
    }
  }

I would't suggest using this for any directory that contains
numerous files though, as it will use up server execution
time, but if you only have a few resident files, you
should have no problem.

Besides, I heard that this problem only exits on Windows
based servers. Unix is supposed to remove its old temp files

I did it this way because my scripts are going to run
on over a thousand servers, and I haven't got time to
play games altering every script to cover PERL's crap.

Hope this helps you!

Tom
  • Comment on Re: filehandles being recorded as CGItemp files