in reply to Re: how to exit if tool is already running
in thread how to exit if tool is already running

Considering flocking the data handle only takes a single line, there isn't much to gain from using a module (the module does more, but the OP doesn't need that). After ending the script with __DATA__ (or __END__), just add:
flock DATA, 6 or die "Duplicate instance";
Or use the Fnctl module and use LOCK_EX|LOCK_NB instead of 6.