in reply to bad interpreter: No such file or directory

If you FTP in binary mode (or otherwise copy) from a Win32 box to a box that's some variant of Unix, you have an invisible hidden carriage return (^M) at the end of each line. The "bad interpreter" that's being referred to in this case is   /usr/bin/perl^M Copy the file in ASCII mode, or use dos2unix (or the equivalent), and your problem will probably go away.

Replies are listed 'Best First'.
Re: Re: bad interpreter: No such file or directory
by Anonymous Monk on Jan 20, 2004 at 09:17 UTC
    Or just make sure you have spaces after /perl, something like #!/usr/bin/perl -w  -
Re: Re: bad interpreter: No such file or directory
by BUU (Prior) on Jan 20, 2004 at 10:16 UTC
    or use dos2unix (or the equivalent)
    Or of course use perl with the p and i switches.. perl -pie's/\r\n/\n/g;'