For line breaks, you can use <p> tags or <br/> tags. Or, as Corion mentioned, you can check out the Writeup Formatting Tips.
A few notes on your code:
- Don't use & when calling subroutines (unless you know that's what you should be using)
- Your variable problem may go away if you try using placeholders in prepare (and then executing with bind values), although what you have looks okay. Have you tried manually running the query? If so, does it return the correct results?
- %incoming is a hash, not an array ;)
- The single quotes aren't necessary when accessing a hash element.
Sorry that I don't have anything too specific. You may want to check out the Tutorials section, there are a few DBI helpers in there.