in reply to •Re: Checking for multiple instances
in thread Checking for multiple instances

That is very cool. Not to pester but would you give a snippet (or point to one) showing it in action?

Replies are listed 'Best First'.
•Re^3: Checking for multiple instances
by merlyn (Sage) on Sep 24, 2004 at 22:21 UTC
    I can't find my working example right now, but from memory, something like this:
    #!/usr/bin/perl use Fcntl qw(LOCK_EX LOCK_NB); flock DATA, LOCK_EX | LOCK_NB or die "Already executing!"; ... rest of code ... # do not remove this __END__! __END__

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      Thanks, that's plenty, I'm sure. I was just a'scared there might be a trick to it that was different from vanilla flock'ing.