http://qs1969.pair.com?node_id=1117538

Amblikai has asked for the wisdom of the Perl Monks concerning the following question:

So i may have this completely wrong and if so i apologise for the daft question! But...

I'm no web developer but have a really basic web site that i'm messing around with. I write a lot of perl and i want a button on the website to execute a perl script.

So far i've managed to so far get a hello_world.pl to execute. And so comes my question: The only way i could get it to work was by inserting the line: print "Content-type: text/html\n\n"; into the script

What if the perl script is not generating any html or anything? Say it's just a script which accesses a mySQL database and writes a file or runs some kind of system command. Do i still need the print "Content-type: text/html\n\n"; Are there other types of "Content-type"

Feel free to tell me to p*** off and do some more reading but my google-fu is clearly lacking and i might just need a nudge in the right direction. If you have any links, they'd be greatly appreciated!

Thanks!