[27844] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9208 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 28 09:05:53 2006

Date: Fri, 28 Apr 2006 06:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 28 Apr 2006     Volume: 10 Number: 9208

Today's topics:
    Re: Linux and Win32 compatability <1usa@llenroc.ude.invalid>
    Re: Linux and Win32 compatability <prawnMUNG@prawn.me.uk>
    Re: Linux and Win32 compatability <noreply@gunnar.cc>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 28 Apr 2006 10:41:22 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Linux and Win32 compatability
Message-Id: <Xns97B3440EF8625asu1cornelledu@127.0.0.1>

Test Test. <> wrote in news:c2l352ddn8ig1occvdv9dl8f76dn31ct4v@4ax.com:

> 
> My most humbl apolgies if this is not the right place for this
> posting.
> 
> My development PC is Win2k with Apache and Perl v5.6.1 for Win32. So,
> my Perl Scripts start with the usual line:
> #!"C:\Program Files\Perl\bin\perl.exe"
> 
> But,
> My Web host  is Linux based, with both Perl and Apache. So, the top
> line my Perl scripts at my ISP site is: #!/usr/bin/perl --
> 
> So far, this top line is the only line which is different between my
> local Win2K site and the online website.
> 
> This question must have been asked before, but, is there any way of
> making the two scripts compatable so that I don't need to track 2
> versions just becuase of the top line?

The other responses to your post fail to take into account the fact that 
Apache on Windows does pay attention to the shebang line.

To keep the shebang line for the Unix system, but tell Apache on Windows 
not to pay attention to the shebang line, see

http://httpd.apache.org/docs/2.0/mod/core.html#scriptinterpretersource

Use

ScriptInterpreterSource Registry-Strict

in your httpd.conf file, and add

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI]
"command"="c:\\opt\\perl\\bin\\perl.exe -T \"%1\""

to your registry (replace the path to perl.exe with whatever is 
appropriate for your system).

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



------------------------------

Date: Fri, 28 Apr 2006 11:47:47 +0100
From: prawn <prawnMUNG@prawn.me.uk>
Subject: Re: Linux and Win32 compatability
Message-Id: <4451f2ca$0$33936$ed2619ec@ptn-nntp-reader03.plus.net>

A. Sinan Unur wrote:

> The other responses to your post fail to take into account the fact that 
> Apache on Windows does pay attention to the shebang line.

Guilty as charged.  Not that I use Perl with apache but it's useful to 
know nonetheless.

Thanks.

-- 
p LotR#9 BotM#1


------------------------------

Date: Fri, 28 Apr 2006 12:57:31 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Linux and Win32 compatability
Message-Id: <4beal3F10d4h9U1@individual.net>

Test Test. wrote:
> My development PC is Win2k with Apache and Perl v5.6.1 for Win32. So, 
> my Perl Scripts start with the usual line:
> #!"C:\Program Files\Perl\bin\perl.exe"
> 
> But, My Web host  is Linux based, with both Perl and Apache. So, the 
> top line my Perl scripts at my ISP site is: #!/usr/bin/perl --

<snip>

> is there any way of making the two scripts compatable so that I don't 
> need to track 2 versions just becuase of the top line?

These are two solutions. First the simple:

http://groups.google.com/group/comp.lang.perl.misc/msg/5d01d5affb0294e8

and then a more elegant(?):

http://groups.google.com/group/comp.lang.perl.misc/msg/46026827a583f19d

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9208
***************************************


home help back first fref pref prev next nref lref last post