I don't like "anonymous" website visitors in a CGI script forking off pretty much anything. An oversight in your code or configuration could lead to a disaster (http://yourhost/script.cgi?MyConfig=/etc/passwd&Delete=Yes ;).

I would rather look to other options. Good alternatives have been mentioned, Cron/AT/TS for deleting the files or possibly using cookies set to expire instead of the little config files. YAOption is having your script ignore any file modified too long ago, using stat:

my $filename = "the_users_file"; my $usable_date = "some number"; my $Modified = (stat($filename))[9]; if ($Modified > $usable_date) { ignore_it } else { continue_as_planne +d }

There's also a File::stat module that can make things a little more readable, while performing the same basic task.
In my personal opinion, deleting files on your server is really a system administration issue, and should not be trusted to a 755 CGI script. From there, it gets pretty easy.

my $0.02; # Nothing more, nothing less.

In reply to Re: CGI scripting and multiple processes by breakwindows
in thread CGI scripting and multiple processes by erikharrison

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.