|There's more than one way to do things
On a contrarian note, thetallblondguy, the time it has taken you to consider the partial solutions in this thread, and the different ways you could indicate variables, might have been better spent looking into a full-grown "real world" application like Template Toolkit (or any of the legion of its kin). Because if this is any kind of serious work, this is not the kind of wheel you want to re-invent.
Your clarification actually suggests your question is not really a perl or CGI question, but a question about how to *surgically* separate the Perl from HTML without breaking either one. That's exactly what templating systems are designed to do.
Sure, you could create perl subroutines that spit out HTML, or separate files with some (special syntax) in them, but the list of wheels you would have to re-invent to get it right are too numerous to list here. For example:
There is a whole catalogue of issues to deal with, and each issue you resolve (on your own) means yet one more (undocumented) 're-invented wheel' that the person who comes after you will have to learn just to figure out what is going on.
If you *really* insist on creating your own system from scratch, you should at least try to use a totally unique syntax for indicating the presence of a 'true variable' ... something that is not likely to appear in any other context.