in reply to
Re: Easiest way to protect process from duplication.
in thread [Solved]Easiest way to protect process from duplication.
Here's a variation that uses the __DATA__ handle.
use Fcntl qw(LOCK_EX LOCK_NB);
die "Another instance is already running" unless flock DATA, LOCK_EX|L
Postpone until later
Each and every
Results (211 votes),