in reply to ftp script problem .. bad interpreter?

bad interpreter Think before you speak, search before you post.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: ftp script problem .. bad interpreter?

Replies are listed 'Best First'.
Re^2: ftp script problem .. bad interpreter?
by jhourcle (Prior) on Apr 18, 2005 at 10:51 UTC

    None of those seemed to have the easiest solution that I know of -- add two dashes at the end of the shebang line:

    #!/usr/bin/perl --

    This tells the system to ignore anything after that point, so even if you accidentally upload a file from windows to unix in binary mode, it'll run just fine. (although, I don't have a windows machine on the network right now, and I've never tested it with pod, <<EOF blocks, or other multiline strings, which are the only parts of Perl code that might depend on lines being read correctly.)

    It should, at the very least, result in better error messages, though, even if it doesn't fix the problem.