<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Which perl question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932446#M97372</link>
    <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;In hp-ux if i start a perl program like "#!/usr/local/bin/perl" and there is no /usr/local/bin/perl binary (or a link to binary), it will go on search my $PATH for perl and execute the program. If I try the same on my laptop (Linux) then it will inform me that there is no interpreter (no /usr/local/bin/perl- even though perl is in my path in /usr/bin) and halt ( which makes sense to me). Do you know why this is happening?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance : )&lt;BR /&gt;&lt;BR /&gt;BR-s, &lt;BR /&gt;Alex</description>
    <pubDate>Wed, 24 Jan 2007 17:50:36 GMT</pubDate>
    <dc:creator>4ldo</dc:creator>
    <dc:date>2007-01-24T17:50:36Z</dc:date>
    <item>
      <title>Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932446#M97372</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;In hp-ux if i start a perl program like "#!/usr/local/bin/perl" and there is no /usr/local/bin/perl binary (or a link to binary), it will go on search my $PATH for perl and execute the program. If I try the same on my laptop (Linux) then it will inform me that there is no interpreter (no /usr/local/bin/perl- even though perl is in my path in /usr/bin) and halt ( which makes sense to me). Do you know why this is happening?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance : )&lt;BR /&gt;&lt;BR /&gt;BR-s, &lt;BR /&gt;Alex</description>
      <pubDate>Wed, 24 Jan 2007 17:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932446#M97372</guid>
      <dc:creator>4ldo</dc:creator>
      <dc:date>2007-01-24T17:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932447#M97373</link>
      <description>If there is no /usr/local/bin/perl the script should fail regardless of the platform. I suspect that what is really happening is that the "shebang" line is not the very first line of your script with no leading whitespace. In that case, the shebang becomes a comment.&lt;BR /&gt;&lt;BR /&gt;In any event, generally the least evil approach that I have found is to shebang all perl scripts as:&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;on all platforms. Then for each platform, I create a symbolic link from the actual location to /usr/bin/perl, e.g.&lt;BR /&gt;ln -s /usr/local/bin/perl /usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;Once that link is created on each target platform, /usr/bin/perl works every time. This convention even works on Windowes because Windows doesn't observe the shebang convention and treats the line as a comment.</description>
      <pubDate>Wed, 24 Jan 2007 18:05:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932447#M97373</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-01-24T18:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932448#M97374</link>
      <description>Hi Alex:&lt;BR /&gt;&lt;BR /&gt;To aid in locating your perl binary, you could do:&lt;BR /&gt;&lt;BR /&gt;# whereis perl&lt;BR /&gt;&lt;BR /&gt;Then, as Clay suggests, create any necessary symbolic link from '/usr/bin/perl' to the installed binary and use the standard link as your standard interpreter line.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 24 Jan 2007 19:24:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932448#M97374</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-01-24T19:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932449#M97375</link>
      <description>One clever trick that I've seen to execute an "interpreter" anywhere in your path is:&lt;BR /&gt;#!/usr/bin/env perl&lt;BR /&gt;&lt;BR /&gt;Unfortunately it doesn't appear to let you put any arguments on that line.</description>
      <pubDate>Thu, 25 Jan 2007 03:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932449#M97375</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-01-25T03:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932450#M97376</link>
      <description>indeed, 'env; used to be a good solution for these kind of problems, but then again, 'env' is not installed on all systems either...&lt;BR /&gt;&lt;BR /&gt;so in the end i just made sure all systems had a link at the same place to the real location.</description>
      <pubDate>Mon, 29 Jan 2007 03:46:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932450#M97376</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2007-01-29T03:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932451#M97377</link>
      <description>Thanks a lot for your comments guys.. No have it all clear : )&lt;BR /&gt;&lt;BR /&gt;Cheers Alex</description>
      <pubDate>Mon, 29 Jan 2007 13:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932451#M97377</guid>
      <dc:creator>4ldo</dc:creator>
      <dc:date>2007-01-29T13:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Which perl question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932452#M97378</link>
      <description>Hi Alex:&lt;BR /&gt;&lt;BR /&gt;We're glad you have found help here.  Please read:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Jan 2007 13:10:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/which-perl-question/m-p/3932452#M97378</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-01-29T13:10:14Z</dc:date>
    </item>
  </channel>
</rss>

