I'm stumped. You're still getting the errors you first reported, right? With the "undef: command not found" stuff?
I don't get any errors when I run the new script. Here is how I tried it:
1. Copied all of the text from the browser window at the URL
http://www.sponsororganizer.com/FreeScripts/cleo.html
2. pasted it into the vi editor in a terminal window on a linux system
3. saved and exited script.
4. chmod +x the new script
5. executed the script
Can you show us the contents of the script as it is on the system you're running it on? (cat remove-right-mouse-code.pl )