in reply to Re^10: making perl executable
in thread making perl executable

Unless you post the code (or a short example which recreates the problem) I can only suggest debugging the problem yourself. Basic debugging checklist and again How do I post a question effectively?.