Your question is a bit vague, but I am assuming you're asking the best way to use perl to present HTML documents. Check out
Template Toolkit, or the simple (but easier)
HTML::Template. Also, you can read through lesson one of my
online CGI course which gives simple demonstration of HERE documents.