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

In reply to Re: filehandles being recorded as CGItemp files by Anonymous Monk
in thread filehandles being recorded as CGItemp files by Andre_br

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.