in reply to script times out mysteriously
If you're FTPing the files from a Windows box to a *nix server in binary mode, carriage returns in the files are retained (ASCII mode removes the carriage returns). The effect of leaving carriage returns in the file is that the shebang line now reads
Depending on how you view the file, you might not see the ^M. With the -w there, this is O.K., but if you remove it and then FTP the file again, you'll get#!/usr/bin/perl -w^M
which no longer names a valid executable file. You try to bring the file up through a web server, and you'll get a 500.#!/usr/bin/perl^M
Try FTPing in ascii mode.