freelanceprogrammers.org Forum Index » Perl

#!/usr/bin/perl vs. #!perlinperl.exe


View user's profile Post To page top
millerdw2003 Posted: Fri Jun 02, 2006 9:37 am


Joined: 02 Jun 2006

Posts: 2
#!/usr/bin/perl vs. #!perlinperl.exe
Hello,

I currently do my development work with Windows/Apache/perl, then
use MS Frontpage to publish my files to my ISP server running
Linux/Apache/perl.

The problem I run into is that the interpreter path is different on
Windows vs. Linux. Windows requires #!perlinperl.exe, while
Linux requires #!/usr/bin/perl. This requires changing the files
everytime I upload.

Of course, I could write a script to modify the first line of every
file in cgi-bin, but I would have to remember to run that script
each time before I upload, then again after the upload completes.

Is there something I could change in Apache to do away with this
header entirely? Any other suggestions?

Thanks in advance for your suggestions.

Regards,
Darren
Reply with quote
Send private message
View user's profile Post To page top
kenshail2003 Posted: Fri Jun 02, 2006 4:42 pm


Joined: 21 Feb 2005

Posts: 8
#!/usr/bin/perl vs. #!perlinperl.exe
Hello,

I currently do my development work with Windows/Apache/perl, then
use MS Frontpage to publish my files to my ISP server running
Linux/Apache/perl.

The problem I run into is that the interpreter path is different on
Windows vs. Linux. Windows requires #!perlinperl.exe, while
Linux requires #!/usr/bin/perl. This requires changing the files
everytime I upload.

Of course, I could write a script to modify the first line of every
file in cgi-bin, but I would have to remember to run that script
each time before I upload, then again after the upload completes.

Is there something I could change in Apache to do away with this
header entirely? Any other suggestions?

Thanks in advance for your suggestions.

Regards,
Darren

Surely windows should run with #!/usr/bin/perl because it does not require
this line and simply sees it as a comment.
Reply with quote
Send private message
View user's profile Post To page top
otrwalter Posted: Fri Jun 02, 2006 5:07 pm


Joined: 02 Jun 2006

Posts: 1
#!/usr/bin/perl vs. #!perlinperl.exe
On Thu, June 1, 2006 11:37 pm, millerdw2003 wrote:
> Hello,
>

<snip>

> The problem I run into is that the interpreter path is different on
> Windows vs. Linux. Windows requires #!perlinperl.exe, while
> Linux requires #!/usr/bin/perl. This requires changing the files
> everytime I upload.

Actually, you don`t nee the ".exe" in the she-bang line.

<snip>

> Is there something I could change in Apache to do away with this
> header entirely? Any other suggestions?

I had the same problem when I started developing in Perl 8 years ago.

Go to...

web.torres.ws/walters_way

If you install Apache, Perl, PHP and mySQL according to that description,
you will not have any "she-bang" issues. In fact, all thhe config files
can be set up to be the same as well.

Good luck. Write me off line if you have any issues.

Walter
Reply with quote
Send private message
View user's profile Post To page top
millerdw2003 Posted: Fri Jun 02, 2006 5:38 pm


Joined: 02 Jun 2006

Posts: 2
#!/usr/bin/perl vs. #!perlinperl.exe
Walter,

Thank you!

I`ve installed quite a few modules with my ActiveState perl
installation, so decided not to reinstall perl from scratch.
However, I found that I could get it to work simply by copying
C:perlinperl.exe to C:usrinperl.exe on my Windows system,
and changing the header line in each script from "#!
perlinperl.exe" to "#!/usr/bin/perl" as you suggested.

This will save me a tremendous amount of time! Thanks again!

I`ve bookmarked your site for future reference.

Regards,
Darren



--- In Perl_Official@yahoogroups.com, "jsWalter" <jsWalter@...>
wrote:
>
>
> On Thu, June 1, 2006 11:37 pm, millerdw2003 wrote:
> > Hello,
> >
>
> <snip>
>
> > The problem I run into is that the interpreter path is different
on
> > Windows vs. Linux. Windows requires #!perlinperl.exe, while
> > Linux requires #!/usr/bin/perl. This requires changing the files
> > everytime I upload.
>
> Actually, you don`t nee the ".exe" in the she-bang line.
>
> <snip>
>
> > Is there something I could change in Apache to do away with this
> > header entirely? Any other suggestions?
>
> I had the same problem when I started developing in Perl 8 years
ago.
>
> Go to...
>
> web.torres.ws/walters_way
>
> If you install Apache, Perl, PHP and mySQL according to that
description,
> you will not have any "she-bang" issues. In fact, all thhe config
files
> can be set up to be the same as well.
>
> Good luck. Write me off line if you have any issues.
>
> Walter
>
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help