in reply to Retrieving Data

Please do not say change the HTML document into a perl file as I cannot do this - it has to stay as a HTML document.

If you have an HTML document and need to stuff a value into a hidden field in a form before sending the document to a browser, then open the HTML document from a CGI, read it into memory, perform a substitution to inject the hidden value, and print the result. It's that simple.

Or, you can use one of the available templating mechanisms, like HTML::Template, which know how to read templates (HTML files with special directives), and make substitions.