McKreeger has asked for the wisdom of the Perl Monks concerning the following question:
I have search documentation, but have not found an explicit answer as to why perl supports the following:
A simple shell script (foo.sh)All of these work:#!/bin/sh echo "Hello"
unix> foo.sh unix> sh foo.sh unix> perl foo.sh
The #! has to be the first line in the file, or it will not work. Is this a known/documented feature of perl?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Shebang behavior with perl
by Corion (Patriarch) on Mar 02, 2015 at 17:17 UTC | |
Re: Shebang behavior with perl
by Anonymous Monk on Mar 02, 2015 at 17:18 UTC | |
Re: Shebang behavior with perl
by LanX (Saint) on Mar 02, 2015 at 17:19 UTC | |
Re: Shebang behavior with perl
by McKreeger (Initiate) on Mar 02, 2015 at 17:39 UTC | |
by MidLifeXis (Monsignor) on Mar 02, 2015 at 18:16 UTC | |
by tye (Sage) on Mar 02, 2015 at 18:33 UTC | |
by MidLifeXis (Monsignor) on Mar 02, 2015 at 18:57 UTC | |
by tye (Sage) on Mar 02, 2015 at 22:29 UTC | |
| |
by Corion (Patriarch) on Mar 02, 2015 at 18:06 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom