<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: bad interpreter: No such file or directory</title>
	<atom:link href="http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/</link>
	<description>Ranting and Raving</description>
	<pubDate>Tue, 02 Dec 2008 21:41:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Ram</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-567719</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Thu, 30 Oct 2008 15:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-567719</guid>
		<description>I was trying to run a script that I copied off the web and pasted into Notepad and saved to my Linux dev server.  It had two problems - one, the shebang line referenced /usr/local/bin instead of /usr/bin/perl and two, the interpreter didn't like my Windows linefeeds.  I deleted the script and used vim to create the .pl file, corrected the shebang line and everything worked. Thank you for this very useful post that pinpointed both issues.</description>
		<content:encoded><![CDATA[<p>I was trying to run a script that I copied off the web and pasted into Notepad and saved to my Linux dev server.  It had two problems - one, the shebang line referenced /usr/local/bin instead of /usr/bin/perl and two, the interpreter didn&#8217;t like my Windows linefeeds.  I deleted the script and used vim to create the .pl file, corrected the shebang line and everything worked. Thank you for this very useful post that pinpointed both issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim_Myth</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-503977</link>
		<dc:creator>Tim_Myth</dc:creator>
		<pubDate>Mon, 25 Aug 2008 13:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-503977</guid>
		<description>YOU ARE AWESOME!!!  My webhost moved my site to a new server, and suddenly one of my cgi scripts quit working. I had the hosting company rebuild my site from a last known good back up, but still got the same problem. I poured over the code line by line, tried to figure out which directory was bad, and ripped a few hairs out (and there's not many of those to spare!). I even lowered myself to asking one of my buddies for help. He's a PhD candidate and the sacrifice was great, but I could not find my error. Even he could find no reason for the error (although he found much fault in my coding skills). I finally stumbled acrossed this post, and (not believing it could be that simple) had my site fixed in a matter of seconds.</description>
		<content:encoded><![CDATA[<p>YOU ARE AWESOME!!!  My webhost moved my site to a new server, and suddenly one of my cgi scripts quit working. I had the hosting company rebuild my site from a last known good back up, but still got the same problem. I poured over the code line by line, tried to figure out which directory was bad, and ripped a few hairs out (and there&#8217;s not many of those to spare!). I even lowered myself to asking one of my buddies for help. He&#8217;s a PhD candidate and the sacrifice was great, but I could not find my error. Even he could find no reason for the error (although he found much fault in my coding skills). I finally stumbled acrossed this post, and (not believing it could be that simple) had my site fixed in a matter of seconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajput</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-330854</link>
		<dc:creator>rajput</dc:creator>
		<pubDate>Wed, 02 Apr 2008 07:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-330854</guid>
		<description>Thanks for the information for “bad interpreter: No such file or directory” error. I too got the same error. But i solved it in a different way. I had written a script in Windows and was trying to execute it on a device with linux kernel. What is did is changed my Windows scripts file to a UNIX format. And Yes!!! The error was gone :-)</description>
		<content:encoded><![CDATA[<p>Thanks for the information for “bad interpreter: No such file or directory” error. I too got the same error. But i solved it in a different way. I had written a script in Windows and was trying to execute it on a device with linux kernel. What is did is changed my Windows scripts file to a UNIX format. And Yes!!! The error was gone :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rog</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-251873</link>
		<dc:creator>Rog</dc:creator>
		<pubDate>Tue, 05 Feb 2008 14:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-251873</guid>
		<description>Thanks, I've never seen the construct Neville showed, it worked</description>
		<content:encoded><![CDATA[<p>Thanks, I&#8217;ve never seen the construct Neville showed, it worked</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: memememe</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-38681</link>
		<dc:creator>memememe</dc:creator>
		<pubDate>Tue, 30 Jan 2007 21:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-38681</guid>
		<description>Thank you so much for posting this!  I spent all morning trying to figure out if there was something wrong with my Perl install (I'm on a 10.3.9 machine).. I even checked the ADC website for notes about Perl and couldn't find anything!!  perl -e was working but reading from my file wasn't.  Finally I searched on the "bad interpreter" error and found your page.  I switched to "Unix" in BBEdit and it fixed it.  Thank you so so much!</description>
		<content:encoded><![CDATA[<p>Thank you so much for posting this!  I spent all morning trying to figure out if there was something wrong with my Perl install (I&#8217;m on a 10.3.9 machine).. I even checked the ADC website for notes about Perl and couldn&#8217;t find anything!!  perl -e was working but reading from my file wasn&#8217;t.  Finally I searched on the &#8220;bad interpreter&#8221; error and found your page.  I switched to &#8220;Unix&#8221; in BBEdit and it fixed it.  Thank you so so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neville Rowe</title>
		<link>http://www.elharo.com/blog/software-development/perl/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-33878</link>
		<dc:creator>Neville Rowe</dc:creator>
		<pubDate>Mon, 15 Jan 2007 13:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/mac/2007/01/11/bad-interpreter-no-such-file-or-directory/#comment-33878</guid>
		<description>Perl used to recommend not doing #!/usr/bin/perl to get the interpreter. Instead you did

#!/bin/sh
exec perl -w -x $0
#!perl

or some other such construct - sorry, it's too long since I've done this regularly.

This has the advantage that sh searches the path for Perl, rather than the location being coded in the script. -w is a special flag which tells Perl to scan for a #!perl line in the file and start executing from there. I appear to remember there is a slight downside that linenumbers when debugging are out slightly ?</description>
		<content:encoded><![CDATA[<p>Perl used to recommend not doing #!/usr/bin/perl to get the interpreter. Instead you did</p>
<p>#!/bin/sh<br />
exec perl -w -x $0<br />
#!perl</p>
<p>or some other such construct - sorry, it&#8217;s too long since I&#8217;ve done this regularly.</p>
<p>This has the advantage that sh searches the path for Perl, rather than the location being coded in the script. -w is a special flag which tells Perl to scan for a #!perl line in the file and start executing from there. I appear to remember there is a slight downside that linenumbers when debugging are out slightly ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
