in reply to perl script not running properly off web server

You didn't mention how you got it from your Windows box to the web server. If you FTP'd it using "binary mode" instead of "ASCII mode,"* your script probably wouldn't run at all, but just return a server error.

*Disclaimer: I don't really know what these mean; I just press the radio buttons. :)

BCE
--Your punctuation skills are insufficient!

  • Comment on Re: perl script not running properly off web server

Replies are listed 'Best First'.
FTP transfer modes
by crenz (Priest) on Aug 01, 2002 at 06:16 UTC

    Unix, Windows and MacOS use different character sequences for newlines. In "Binary mode", the FTP program will transfer the file as it is -- just what you expect --, whereas in "Ascii mode", it will change the newlines to those of the target system. Unfortunately, this can break binary files (like images) and generally introduces a lot of trouble. Fortunately, Perl usually doesn't have a problem with different newline sequences.

    I recommend editing everything in unix newline mode (perl scripts/modules, HTML files, ...) and upload in "Binary mode" only.