mikerzz has asked for the wisdom of the Perl Monks concerning the following question:

Monks! I require assistance!

I have a perl application that works perfectly fine on Unix. I packaged it up using the perl packager utility (pp), and have been able to move that package to several different unix machines and run the perl app without issue. However, I also need to be able to run this perl app from machines running Windows and on windows, my app blows up. I get this error when I try to execute it on Windows:

C:\ftp_gpg\script>perl ftp_gpg.pl send Can't load 'C:/Perl/site/lib/auto/Socket/Socket.so' for module Socket: + load_file:%1 is not a valid Win32 application at DynaLoader.pm line 230. at Net/FTP.pm line 17 Compilation failed in require at Net/FTP.pm line 17. BEGIN failed--compilation aborted at Net/FTP.pm line 17. Compilation failed in require at ftp_gpg.pl line 10. BEGIN failed--compilation aborted at ftp_gpg.pl line 10.
Any help would be greatly appreciated. Thanks monks!

Replies are listed 'Best First'.
Re: Moving Perl script to Windows
by CountZero (Bishop) on Dec 23, 2008 at 21:24 UTC
    Socket.so is a compiled module and will not run on Windows. Your best bet is to re-install your application on a Windows machine (which has the Windows equivalent of Socket.so (Socket.dll perhaps?) available and package it up on that Windows machine for further installation on the other Windows boxen.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Moving Perl script to Windows
by Bloodnok (Vicar) on Dec 23, 2008 at 22:51 UTC
    As CountZero says, the Socket.so file is specific to a *NIX host - I suspect your answer may be to...
    1. Download and install pp to your Windoze perl environment (which you don't identify).
    2. Download and install the Socket module (and any/all dependencies) to your Windoze perl environment (if it/they isn't/aren't already)
    3. Copy the script(s), comprising the application, to your Windoze perl environment
    4. Now run pp on your application, in the Windoze perl environment

    With any luck and a following wind, the result should be a Windoze variant of the application.

    A user level that continues to overstate my experience :-))
      >> Download and install pp to your Windoze perl environment >>(which you don't identify). Sorry about that, monks. The Windows environment consists of a Windows XP machine with ActivePerl 5.8.8 build 824. I will follow the advice that you and one other gave me and re-package my perl application/script on the Windows machine. Thank you, monks!
      I'm afraid he's on Windows ;)
Re: Moving Perl script to Windows
by ptoulis (Scribe) on Dec 25, 2008 at 16:03 UTC
    I would strongly recommend moving from ActivePerl to Strawberry Perl (http://strawberryperl.com/). It is not a different..Perl, but you will also get the tools you require to build Perl modules from source (e.g. gcc, dmake, etc)
    Hope that helps!