Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

edit the perl shebang line

Status
Not open for further replies.

stormbind

Technical User
Joined
Mar 6, 2003
Messages
1,165
Location
GB
Hi,

How can I change the PERL shebang line. I want to emulate the webhost on my PC for testing and it's really troublesome that the two settings are not the same.

----------
I'm willing to trade custom scripts for... [see profile]
 
Open the script in notepad
Edit the 'shebang line'
Save the script

If your asking 'how do I emulate the shebang line that is required for unix under windows' the answer is 'you should not need to , your webserver should associate .pl files with your perl interpetor'.
 
It does not though! :(

To get a PERL script working on Apache/Win32 I have to use this:

#perl

To get a PERL script working on my webhost (Apache/*nix) I have to use:

#usr/bin/perl

This is makes testing scripts offline a lot more work than they should be and it's bloody awful!

----------
I'm willing to trade custom scripts for... [see profile]
 
Yes, the scipts are associated with the interpreter but I want to test them in Apache - as a web page.

It's no good seeing it popup as a command line when it's supposed to be outputting interactive HTML.

----------
I'm willing to trade custom scripts for... [see profile]
 
So just change it locally, test and work on it and then before sending it back out put the proper shebang line in.

I must be missing your real question...
Are you really asking 'I have like 400 scripts with the unix shebang and I want to easily convert these to the win32 shebang'?


 
Yup, you got it.

I have loads of scripts and complex directory structure :(

----------
I'm willing to trade custom scripts for... [see profile]
 
Not only that, but that ain't mine! So no breaking them... LOL

----------
I'm willing to trade custom scripts for... [see profile]
 
I can think of no automatic way to handle this. Your best bet is to write a perl script to parse all the perl files in the directory each way. Then you can automagically make them work locally and then automagically make them work remotely.

Sorry I can't give more advice on that one.
 
There has to be something in the config. This is ridiculous!

It's not platform specific, it is to do with the setup :(

----------
I'm willing to trade custom scripts for... [see profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top