quick help for dumb problem
You have to print that before everything you print. If you plan on printing multiple times from the same script, put it in a subroutine.
sub mime {
print "Content-type:text/html\n\n";
}
Then when you want to use it just use
&mime;
VulKen
Keepin' It Realistic
[This message has been edited by VulKen (edited 18 June 2000).]
Pimpin like a pimp with an electrofied pimpin machine!
minton posted this at 04:13 — 18th June 2000.
They have: 314 posts
Joined: Nov 1999
ok, thanks Vulken
------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts
Rob Pengelly posted this at 04:35 — 18th June 2000.
They have: 850 posts
Joined: Jul 1999
Actually, I beleive that you only need to print out the html header one time. If you use "print "Content-type:text/html\n\n";" a second time, it will actually print "Content-type:text/html".
------------------
click here to help save lives
http://www.wiredstart.com : The Technology Start Page
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
minton posted this at 10:16 — 18th June 2000.
They have: 314 posts
Joined: Nov 1999
Ok, I am learning perl and made a script to calculate the circumference of a circle with a radius of 12.5. The code is:
#!/usr/bin/perl
$pi = 3.121592654;
$result = 2 * $pi * 12.5;
print "radius 12.5 is circumference $result\n";
I uploaded it and it comes back with a internal server error 500. I chmoded to 777, 755 and the folder it is in to 777 and 755.
I do not know why such a simple script wont work. I thihnk it worked offline. I was using perl for windowws but I still dont know how to use it so I just double clicked on the file and when the window came up for about a tenth of a sec I slammed on pause break and the answer ws correcy.
Could someopne tell nme why I get this error.
Thanks
------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts
Thomas
The JavaScript Place
The JavaScript Place Forums
Rob Pengelly posted this at 11:24 — 18th June 2000.
They have: 850 posts
Joined: Jul 1999
Before printing the answer,
add
print "Content-type:text/html\n\n";
------------------
click here to help save lives
http://www.wiredstart.com : The Technology Start Page
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
minton posted this at 12:24 — 18th June 2000.
They have: 314 posts
Joined: Nov 1999
Thanks! it worked. I was under the impression that that was only for programs with a cgi extension. Don't know where I picked that up from.
One thing though, Do I have to put that code at the bginning of each print or jyst once and then the perl will kow that all things with print in need to be text/html?
Thanks for your help.
I'm off to get stuck again
------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts
Thomas
The JavaScript Place
The JavaScript Place Forums
Matt Kaufman posted this at 19:52 — 18th June 2000.
They have: 324 posts
Joined: Dec 1999
Cheating on your homework, eh?
Matt Kaufman posted this at 19:53 — 18th June 2000.
They have: 324 posts
Joined: Dec 1999
Oh.....yeah, it's summer lol forgot
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.