I thought about that too, why I was continuing to use the lock file that is. It was in the script I was trying to improve. I had asked someone familiar with the history of that script why it was being used, and they said somthing to the effect that at one time something prevented mailx from completing and reexecution of the script just caused more mailx instances and more script instances. But thinking about it as I type this, the $nlfile should prevent that problem from reoccuring, if it still exists.
I will dig into Net::Ping, so many modules-so little time.=)
Thanks for looking.