If I understand correctly, it sounds like you are doing:
<form method="post" action="/cgi-bin/myScript?location=value">
and by doing so, you have no access to location parm via:
my $location = param('location');
If this is the case, I would suggest you use a hidden parameter ala:
<form method="post" action="/cgi-bin/myScript">
<input type="hidden" name="location" value="val">
you can then access the location value via the param call.
UPDATE: in re-reading, it appears that you are wanting the form
var to appear in the browser location field for a POSTed form.
If this is the case, then I am not sure there is a solution