in reply to translating php to perl

You can use any template system supported by catalyst, see Catalyst::View for a list of them (though TT2 is perhaps the most popular choice).

The man page for Catalyst::View::TT shows how to access query parameters from the templates e.g.
The field is [% Catalyst.req.field %]