Printing some basic PERL text.
This is how it's done, I'm sure.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "heh";
Yet, that simple script, I still get a 500!!!! Is there something here I just don't see or is something wrong with the server's PERL interpretator?
Orpheus posted this at 05:54 — 15th August 2000.
They have: 568 posts
Joined: Nov 1999
1. Change the top line to our path to perl if that isn't it
2. Upload in ASCII
3. Chmod 755
Ken Elliott posted this at 12:57 — 15th August 2000.
They have: 358 posts
Joined: Jun 1999
Well I have run into your problem as well. I found that sometimes it requires the full html headers. So try printing
BLEH
these tags as well and it might rectify your situation.
VulKen
BOLD
Pimpin like a pimp with an electrofied pimpin machine!
Orpheus posted this at 17:17 — 15th August 2000.
They have: 568 posts
Joined: Nov 1999
actually those HTML headers wont affect the output.
Laguna Loire posted this at 00:22 — 16th August 2000.
They have: 45 posts
Joined: Aug 2000
You just wont see anything.
Mark Hensler posted this at 01:04 — 16th August 2000.
He has: 4,048 posts
Joined: Aug 2000
The script is fine, just check the stuff Orpheous said.
Laguna Loire posted this at 01:58 — 16th August 2000.
They have: 45 posts
Joined: Aug 2000
If you dont tell the browser it wont know what to do.
Orpheus posted this at 03:04 — 16th August 2000.
They have: 568 posts
Joined: Nov 1999
actually thats not true.
in most cases the browser will print the basic headers if it doesn't detect them.
Ken Elliott posted this at 15:14 — 16th August 2000.
They have: 358 posts
Joined: Jun 1999
I was just saying what I found. I made a simple script, and it was giving me premature end of script headers...so I went through everything, and once I put in the proper html headers, the script executed fine.
The script executed fine in command line, but the browser didn't like it. So I was just givin' my 2 cents.
GL
VulKen
Pimpin like a pimp with an electrofied pimpin machine!
Mark Hensler posted this at 05:46 — 17th August 2000.
He has: 4,048 posts
Joined: Aug 2000
You could always use:
print "Content-type: text/plain\n\n";
Then your browser should just print whatever you tell it, thinking it's just a ASCII file.
Mark Hensler
If there is no answer on Google, then there is no question.
Ken Elliott posted this at 13:01 — 17th August 2000.
They have: 358 posts
Joined: Jun 1999
Just curious, would the browser print it out like a text file?? Or would it compile the page? This could prove quite useful for me.
Thanx.
VulKen
I'm Higher In The Food Chain, GET IN MY BELLY!
Pimpin like a pimp with an electrofied pimpin machine!
Mark Hensler posted this at 21:50 — 17th August 2000.
He has: 4,048 posts
Joined: Aug 2000
with:
print "Content-type: text/plain\n\n";
it *should* print it like a .txt file
Vorm posted this at 04:36 — 20th August 2000.
They have: 62 posts
Joined: May 2000
I think it was some weird server problem. It worked the next day, without any changes.
And if I had uploaded in binary, I would have got an error in the ol' Telnet checker. Oh well, just more adventures in PERL!
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.