I had a problem like that quite some time ago. This may not be the same thing though, just a thought. I was creating and testing my scripts on a windows box (unfortunately). The problem was that I was uploading them to a linux box. The line endings from windows caused compilation errors. After replacing the bogus windows line termination characters, everything worked fine. Again, this may not be the problem at all (since you didn't specify the OS of the development or production machines), it's just a thought.
I was creating and testing my scripts on a windows box (unfortunately). {snip!} After replacing the bogus windows line termination characters, everything worked fine.
OMG! I haven't worked on a Windows box to develop code
that I forgot all about that happening to me. I was
consulting for a company that their development environment
and all their version control tools were on Windows NT and
the same exact thing happened to me. So I downloaded a
X-11 server for
Windoze NT and used XDM to log onto a Solaris box
that way. Never had that issue again. (They had an analog
to their VC software on Solaris)
Peter @ Berghold . Net
Sieze the cow! Bite the day!
Test the code? We don't need to test no stinkin' code! All code posted here is as is where is unless otherwise stated.
If you use #!/usr/bin/perl -<options> -- The shell and perl will ignore everything after the -- including the return.
If your ftp (on both ends) is not broken, transferring the files in ASCII mode should fix up the line breaks to be the correct variety on both ends of the link as needed.
Some windows ftp clients see that the remote end is Unix and so use binary mode for everything which, of course, is not the correct behaviour.