I am looking at your code, and I see that something seems odd with your shebang line:
According to the perl docs, putting -c tells it to check the syntax only, and not to actually run the code. I'm not sure if that line is used when you are using perl under Win32, but that definitely is something I'd check.