in reply to bad interpreter: No such file or directory

There is a character after the 'perl' (probably a DOS line ending) - if you are using FTP to transfer the file from a windows machine to a Unix one you should use ASCII mode

/J\

  • Comment on Re: bad interpreter: No such file or directory

Replies are listed 'Best First'.
Re^2: bad interpreter: No such file or directory
by Fletch (Bishop) on Jul 22, 2004 at 10:53 UTC

    Yup, this is what the problem is. The #! line is most likely "/usr/bin/perl\r\n", and the carriage return is putting the cursor back to the beginning of the line (which makes the shell's error message apparently start over with no path). Whenever you get strage error messages like this using od or your platform's variant of strace can be enlightening in seeing exactly what's being output or exec'd.