On Friday, May 11 2007, Todd B. wrote:
So, when it comes down to it, what’s the point of the shebang line?
I’ve always heard a slightly different, and in my opinion, logical
Lets say you just got a new job as a sysadmin. The previous sysadmin
Perl guy, and since he was a good sysadmin, he used the shebang line in
of his scripts , and he or she didn’t add on the .pl .
Now, you come in, and seeing this Perl code, you scream and absolve to
it in Ruby, the cool kid on the block. After obtaining permission, you
in and rewrite everything, and everything keeps working.
Now, imagine the same scenario, but no shebang line, and a .pl
you change the scripts, they won’t work, because somewhere, someone is
running them with “perl myscript.pl”, and myscript.pl will no longer
or be a Perl script, after you are done with it.
So, shebang lines (and a lack of file extensions) are
and future proof.