<?xml version="1.0" encoding="windows-1252"?>
<node id="222910" title="Re: &amp;bull;Re: Re: Re: shebang line - foreign to me" created="2002-12-29 06:28:03" updated="2005-07-06 08:34:48">
<type id="11">
note</type>
<author id="127307">
IlyaM</author>
<data>
<field name="doctext">
&lt;i&gt;Either that's a recent feature (and therefore not portable), or hasn't been documented.&lt;/i&gt;
&lt;p&gt;
I think it was there at least since 5.005. There is some mentions of this feature in [cpan://ExtUtils::MM_Unix] (search for fixin) but it seems it is not documented anywhere properly.
&lt;p&gt;
&lt;i&gt;Where did you find out about this?&lt;/i&gt;
&lt;p&gt;
From personal experience. I just noticed that [ExtUtils::MakeMaker] always replaces my shebang with something else :) For example on my Linux system it replaces existing shebang with
&lt;code&gt;
#!/usr/bin/perl -w

eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

&lt;/code&gt;
On Win32 I noticed that [ExtUtils::MakeMaker] does another magic. It creates .bat file which wraps perl script and adds .pl extenstion to perl script when doing its installation. I found that at least on Unix, Unix-like systems and on Win32 systems [ExtUtils::MakeMaker] does the right thing.

&lt;p&gt;
&lt;font color="grey" size="-2"&gt;
--&lt;br&gt;
Ilya Martynov,  &lt;a href="mailto:ilya@iponweb.net"&gt;ilya@iponweb.net&lt;/a&gt;&lt;br&gt;
CTO IPonWEB (UK) Ltd&lt;br&gt;
Quality Perl Programming and Unix Support
UK managed @ offshore prices - &lt;a href="http://www.iponweb.net"&gt;http://www.iponweb.net&lt;/a&gt;&lt;br&gt;
Personal website - &lt;a href="http://martynov.org/"&gt;http://martynov.org&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;</field>
<field name="root_node">
222457</field>
<field name="parent_node">
222586</field>
</data>
</node>
