use Proc::PID_File; exit if hold_pid_file("/tmp/myscripts_name_here.pid");