in reply to Re: (8)Exec format error: when running the script on Linux
in thread (8)Exec format error: when running the script on Linux

I tried what you monks said, but it didn't quite work out for me.
Until I discovered that some stupid editor inserted the utf-8 byte order mark without asking and thus mangled my shebang into #!/usr/bin/perl

I had to change the encoding to remove the mark, and now everything works fine :)

Replies are listed 'Best First'.
Re^3: (8)Exec format error: when running an unicode script
by Anonymous Monk on Oct 15, 2013 at 15:06 UTC

    If you are using Notepad++ as your editor and you are using unicode, be sure to have it set to "Encode n UTF-8 without BOM".

    Otherwise, you get that leading character,