>-----Original Message-----
>From: Brian Shoemaker [mailto:[EMAIL PROTECTED]]
>Sent: Monday, May 14, 2001 4:55 PM
>To: [EMAIL PROTECTED]
>Subject: flock
>
>
>Starting very soon, we'll be changing from Linux to NT.
I am so sorry for you. :-)
>Currently, at the beginning of programs I use the following
>use Fcntl qw(:flock);
>then later in the scripts I use
>flock(FILE, LOCK_EX);
>
>The Perl 5 book I have says flock function doesn't work in
>Windows systems.
>
>I don't want to create a lock file each time someone accesses
>a file and
>then have to delete that lock.
Argh. I think NT & Windows 2000 emulate flock, I believe, or at least it's
available in Perl 5.6.1. I just tried the simple example from the perldoc
(with appropriate exception handling added to see if it threw fatal
exceptions), and it didn't complain about anything on my Win2k box using the
Cygwin Perl 5.6.1. Give it a shot and see what happens. I know on Win9x
flock definitely does not work.
-- Brett