Call me old fashioned, but I think this line:
my @stuff = @ENV{ @vars };
might look/work better like this:
my @stuff = map { $ENV{$_} } @vars;
(But I'm just not familiar with the "@ENV{@vars}" syntax, so this might not be the issue...)

update: Okay, so now that I've learned a new wrinkle of Perl syntax ("@ENV{@vars}" works just like the "map{}" construct that I had been comfortable with), I need to bow out of the discussion... I'd recommend some alternate method to verify that your set of ENV keys do in fact have values assigned to them when that line executes, but Windows CGI is another area that is foreign to me, so I wouldn't hazard a guess about the best way to do that...

And having put "file lock" in the search box, and briefly scanning a few relevant nodes, I don't understand why you're getting that error about flock() not being implemented on your platform... unless you're dealing with some web service provider as your cgi host machine, and they have some deficiently-configured version of Perl to satisfy some sort of "policy".

another update: Well, december may be right -- there seems to be conflicting info about flock on windows, but it looks like it really isn't there -- but it wouldn't be hard to roll your own substitute for this particular app, using a semaphore file. There was a nice article about this in TPJ back in February, I think -- you can find it here:

http://www.samag.com/documents/s=4075/sam1013019385270/


In reply to Re: Problem with CGI script. by graff
in thread Problem with CGI script. by DigitalKitty

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.