http://qs1969.pair.com?node_id=321909


in reply to What's #! got to do with it?

The shebang specifies what kind of program needs to interpret the code. Besides Perl, this can be python, bash, sh, etc. Dropping the shebang, makes your shell clueless. What to do with the code?

Presumably, you tried $ perl script instead of $ ./script. In the first example, you just feed perl the script. In the second case, you tell your shell: "Hey, execute this script!". In that case, it would be nice if your shell knew what kind of code it was :)

--
b10m