I'm new to programming and am having a bit of trouble getting a very simple .pl script to work. It's for a message board, and is as basic as it gets, yet it keeps returning a 500 error. I checked with my host server and they sent me back something I don't understand.

Bareword found where operator expected at ./post_message.pl line 31, near ""<style type="text" (Missing operator before text?) String found where operator expected at ./post_message.pl line 31, near "css">\n"" Bareword found where operator expected at ./post_message.pl line 46, near ""Posted by: $yourname <a href="mailto" (Missing operator before mailto?) String found where operator expected at ./post_message.pl line 46, near "$email">Return Message by Email</a><br>\n"" (Missing operator before ">Return Message by Email</a><br>\n"?) syntax error at ./post_message.pl line 31, near ""<style type="text" syntax error at ./post_message.pl line 46, near ""Posted by: $yourname <a href="mailto" Execution of ./post_message.pl aborted due to compilation errors. -----

This appears to be due to embedding double-quotes in a double-quoted string.

---------------------------------------------------------------- Anybody care to decode this for me and explain what I did wrong and how to fix it?

There are 2 key syntax errors in your code, and your host correctly pointed out that they were due to double quotes inside a double quoted string, which need to be escaped. Check lines 31 and 46 of your code, and escape (\") every internal double quote like so:

For reference, there is no need to use multiple print statements to print a block of HTML code. Here is how to print a block of HTML code (note you don't need to escape characters, just write HTML code as you normally would. It will end printing when it reaches the closing string (in this case HTML Code)):