zitic has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; print '<html><head></head><body>'."\n"; print 'Some content here'."\n"; print '</body></html>'."\n";
I just can't understand what exactly is wrong with this script. Browser receives message 'Internal server error' and apache error log has line 'Premature end of script headers'.
I understand that this error could be logical if I had missed following line:
print "Content-type: text/html\n\n";
So I'm really confused.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Premature end of script headers
by marto (Cardinal) on May 11, 2010 at 08:47 UTC | |
|
Re: Premature end of script headers
by Corion (Patriarch) on May 11, 2010 at 08:45 UTC | |
by JavaFan (Canon) on May 11, 2010 at 13:05 UTC | |
|
Re: Premature end of script headers
by Skriptke (Acolyte) on May 11, 2010 at 12:11 UTC | |
by moritz (Cardinal) on May 11, 2010 at 12:14 UTC | |
by Skriptke (Acolyte) on May 11, 2010 at 12:23 UTC | |
|
Re: Premature end of script headers
by Anonymous Monk on May 11, 2010 at 13:12 UTC | |
|
Re: Premature end of script headers
by zitic (Initiate) on May 11, 2010 at 14:00 UTC | |
by ww (Archbishop) on May 11, 2010 at 16:17 UTC |