in reply to changing form action

by using the right parameter to the start_form()-method:
print $query->startform(action=>$site, method => 'your desired method');
see the documentation of CGI.pm for details.

if you have printed the form-tag already, there's now way to change it (doesn't that sound logical?), since it has probably already made its way to the client.
you have to go for another approach: don't print until the point where you want to change, but collect everything in a variable, then print it.

update:
of course i meant 'action' instead of 'method', i somehow read 'method'. but still it's the same thing and the same solution