move the hard coded URL in tt file to POST a form
If you want to move any element from the template to the module, it's quite a simple matter of assigning it to a stash variable:
$c->stash('action' => 'http://example.org/cgi-bin/download.pl');
Then you can call it from the template:
<form action="[% action %]" method="POST">
However, for a better answer to your case, I suggest showing the template code as well, and maybe some more information about the task in hand.
Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert