Multiline shebang: Difference between revisions

Content added Content deleted
(Add {{incorrect}} to 10 examples, because: "This is not a multiline shebang. A plain #! can only have one line.")
Line 64: Line 64:


=={{header|Perl}}==
=={{header|Perl}}==
From <code>perldoc perlrun</code>, the following is supposed to find perl one way or another under sh, csh or perl.
{{incorrect|Perl|This is not a multiline shebang. A plain #! can only have one line.}}
<lang perl>#!/usr/bin/perl
A plain shebang will do.
eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}'

<lang perl>#!/usr/bin/env perl</lang>
& eval 'exec /usr/bin/perl -wS $0 $argv:q'
if $running_under_some_shell;</lang>


=={{header|Python}}==
=={{header|Python}}==