warning flag on shebang line - premature end of script header

P

Prachi

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.
 
A

axel

Prachi said:
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
 
P

phaylon

Prachi said:
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
 
A

A. Sinan Unur

(e-mail address removed) wrote in @fe2.news.blueyonder.co.uk:
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
 
P

Prachi

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
 
S

Sherm Pendley

Prachi said:
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--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top