in reply to Compilation Error.

Are you sure this is all of your code? IMHO perl2exe is messy, regardless I don't see you using it properly, there's nothing in your code which tells it which modules to include. I suggest you either read the manual (because it's obvious that you have not) or use pp (Super Search for research, use  pp -x, read the documentation) to package your script and it's dependencies.