Way to completely sidestep the issue, people.
minixman, ignore those pedantic wretches who never really attempted to answer your question. To rebuke their points, it is fine to hardcode HTML with here documents in small cases like this if you want to. For larger projects, use the tools they suggested. In answer to your question, the simplest way to do this would be to grab the command param, then wrap it in qx//, assigned to a variable, then print this variable in your here document. A better way would be to have a set of subroutines that handle allowed user commands, parsing out relevant information and adding formatting tags as appropriate to your wants prior to printing.