FM,
Take a look at perldoc -f -X. The difference between -e (exists) and -x (executable by effective UID/GID) may be a big one. Before I go any further - what do you mean -x didn't work? What happens when you try to run it? What's the output? What's the error message? Saying "it doesn't work" isn't very helpful.