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

I have a perl script that works fine. But if I make a small modification that is NOT code related it gives me a server error.

The modification is something that is supposed to "print" on the web page. Again, not part of any coding. Old: "searching for area..." New: "searching for country..."

I am doing the modification in WordPad and have tried saving it both as "text document" and "unicode text document." Still does not work.

I upload it in binary format.

What now?

Note: A long time ago I made other changes without any problems. Don't have any idea why I can't do it now. Thanks.

  • Comment on Perl script server error after minor non-code modification

Replies are listed 'Best First'.
Re: Perl script server error after minor non-code modification
by Corion (Patriarch) on Jun 20, 2014 at 06:09 UTC

    Wordpad is unsuitable for editing "plain text" files. It will convert your file to an RTF formatted file by default.

    Use notepad.exe or another "proper" text editor. When using notepad.exe, make sure to save the file as "Text file", not as unicode text file, which will result in the same error as you already got.

Re: Perl script server error after minor non-code modification
by poj (Abbot) on Jun 20, 2014 at 05:40 UTC

    Try using an editor that allows you to chose either Windows or UNIX end of line format. Notepad++ is one.

    poj
Re: Perl script server error after minor non-code modification
by soonix (Chancellor) on Jun 20, 2014 at 10:27 UTC

    In addition to the previous hints: if notepad shows you one long line instead of your nicely formatted script, you have to transfer your files in "ASCII mode" instead of "binary".

    If your editor can operate with both types of line endings (as proposed by poj), you can continue using binary transfer.