I am running a script named statusCron.pl.
I want when I run that script, that script can detect/print its name which is statusCron.pl. By that I can detect its process ID so that if it found itself already running on the background it will kill itself.
By this I can eliminate hardcoding and re-apply it to all of my scripts.
Additional: I dont want the directory to be included.