Welcome to WebmasterWorld Guest from 18.104.22.168
We are not familiar with perl or cgi, but after much finagling, we have most of the site up and running. The site uses a header.cgi file which is included at the top of almost every page. At the very top of this file are the following two lines of code.
print "Content-type: text/html\n\n";
I've noticed that in all the pages utilizing this header, the text Content-type: text/html displays on the actual web page. This is not correct as it should be html. Also, I wasn't sure what the print q^ did.
Is there something wrong in the two lines of code that would cause the file to print out html as text (Content-type: text/html)?
And what is the function of the print q^?
Thanks in advanced!
print q^some stuff to print^;
although using the "^" character as a string delimiter is also unusual it is valid if someone wanted to do that.
I believe you are correct in your assumption.
The line directly after print q^ is standard html...
If I go to the bottom of the file, it ends with
Note the closing ^ "closing" carrot.
I will try to find out where else the http header is getting written out...
There was a related discussion at [webmasterworld.com...] .
[edited by: phranque at 2:50 am (utc) on Mar. 17, 2008]
[edit reason] fixed the link [/edit]
Thank you both for your replies. Please excuse my inexperience with Perl and Perl modules. I see in the code the lib path that references the un-installed perl module.
If I understand you correctly, I can just upload the .pm file to the directory of where the lib path is already pointing and it is "installed"?
Do I only need to upload the .pm file? When I unzip the module, it consists of numerous files and directories.
[edited by: phranque at 2:47 am (utc) on May 9, 2008]
[edit reason] No urls, please. See TOS [webmasterworld.com] [/edit]