Check out the excellent CPAN module Sys::RunAlone, it should help fix this problem. It cleverly locks your scripts DATA handle to prevent another invocation of the same script doing so. It's cross-Unix, but you'd need something fancier on Windows.
HTH,
SSF
Comment on Re: 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: