in reply to get query string to HTML::Template

Although I agree with everyone else with regards to properly asking a question, I think this may point you in the right direction: HTML::Template Tutorial. In it, there is a discussion about using the attribute "associate" when constructing a new template. Without trying to steal jeffa's thunder, I am quoting him as saying:
That's where associate saves the day. It allows you to inherit paramte +r values from other objects that have a param() method that work like + HTML::Template's param() - objects like CGI.pm!

I strongly recommend you read CGI and HTML::Template. There is also a good HTML::Template reference here. That should give you plenty of information to get started with.