in reply to Re: Ensuring only one copy of a perl script is running at a timein thread Ensuring only one copy of a perl script is running at a time
$cmd = 'ps -eaf | grep -c "\< '."$0".'\>"'; chomp($instances = `$cmd`); if($instances > 1) exit; [download]