in reply to problem with shebang

Here's another tack. Run this command, and you should get the # and the ! as output
$ od -c -N2 hello.pl 0000000 # !
If you don't, then there's some kind of whitespace or other invisible character (a BOM maybe) before the #!, and that's what is hiding the shebang from the operating system.

Replies are listed 'Best First'.
Re^2: problem with shebang
by Aldebaran (Curate) on Oct 18, 2018 at 00:26 UTC

    Interesting, TimToady, I didn't know the od command:

    $ od -c -N2 1.hello.pl 0000000 # ! 0000002 $ man od $ od -c -N8 1.hello.pl 0000000 # ! / u s r / b 0000010 $