I have used
Proc::PID::File and find it very easy to use:
use Proc::PID::File;
die "Already running!" if Proc::PID::File->running();
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]