Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > warning flag on shebang line - premature end of script header

Reply
Thread Tools

warning flag on shebang line - premature end of script header

 
 
Prachi
Guest
Posts: n/a
 
      05-17-2005
I have this perl cgi script which works great when I have the -w
warning flag on the shebang line. But, if remove the -w flag, it
generates a 'Premature end of script header' error. Could someone
explain why this could happen?

Thanks!
Prachi.

 
Reply With Quote
 
 
 
 
axel@white-eagle.co.uk
Guest
Posts: n/a
 
      05-17-2005
Prachi <(E-Mail Removed)> wrote:
> I have this perl cgi script which works great when I have the -w
> warning flag on the shebang line. But, if remove the -w flag, it
> generates a 'Premature end of script header' error. Could someone
> explain why this could happen?


Not without seeing the script, no.

Axel

 
Reply With Quote
 
 
 
 
phaylon
Guest
Posts: n/a
 
      05-17-2005
Prachi wrote:

> I have this perl cgi script which works great when I have the -w warning
> flag on the shebang line. But, if remove the -w flag, it generates a
> 'Premature end of script header' error. Could someone explain why this
> could happen?


I think we've got that one before in here. Check your line-endings, maybe
your system get's a #!/path/to/perl^X as shebang, which would lead to
#!/path/to/perl -w^X if you specify -w. The ^X is for that one char which
shouldn't be there.

hth,p

--
http://www.dunkelheit.at/
thou shallst fear...

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-17-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:9Jnie.87450$Cq2.20249
@fe2.news.blueyonder.co.uk:

> Prachi <(E-Mail Removed)> wrote:
>> I have this perl cgi script which works great when I have the -w
>> warning flag on the shebang line. But, if remove the -w flag, it
>> generates a 'Premature end of script header' error. Could someone
>> explain why this could happen?

>
> Not without seeing the script, no.


As well as the exact error.

Guess: OP, did you remember to transfer the file in ASCII mode over FTP?

Please do read the guidelines for this group to learn how you can help
others help you.

Sinan

--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
Prachi
Guest
Posts: n/a
 
      05-17-2005
Sorry about my question with no details. But, my script was rather
large and it uses a few of my modules as well, so I decided to see if
it was a well known thing and could be answered without the code etc.
ftping the files again in ascii mode solved my problem.
Thanks everyone for all the help!

Prachi

 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      05-17-2005
Prachi wrote:
> I have this perl cgi script which works great when I have the -w
> warning flag on the shebang line. But, if remove the -w flag, it
> generates a 'Premature end of script header' error. Could someone
> explain why this could happen?


Have a look at: perldoc -q 500

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: premature end of script headers Phil Frost Python 0 07-10-2004 03:24 AM
'Premature end of script headers' error when starting Apache inboot time Greeshma Python 1 02-27-2004 08:19 AM
'Premature end of script headers' error when starting Apache inboot time Greeshma Python 0 02-25-2004 04:44 AM
Optimize flag on shebang line Andres Corrada-Emmanuel Python 0 12-09-2003 07:02 PM
Premature end of script headers Wayne Deleersnyder Perl 1 11-21-2003 01:00 PM



Advertisments