in reply to Using Fcntl in CGI

I know flock often doesn't work on Win(9[58]|ME) boxes. Not sure about NT. Try running this:

#!perl open(TEST, '>', 'file.tmp') or die "Can't open file: $!\n"; flock(TEST, LOCK_EX) or die "Can't lock file: $!\n"; print "Passed\n"; print TEST "Hello, World!\n"; close(TEST);

And see if you get any error messages.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Using Fcntl in CGI
by Avox (Sexton) on Apr 08, 2003 at 14:56 UTC
    Your code worked fine as long as I include the Fcntl;