in reply to How to open an URL with variable in CGI?

I assume that $1 is the result of a regular expression match. If not you should change it to a textual name. The reason the target url is not recognising the query parameters is that this is a POST request. You need to add some hidden fields to pass those parameters:
my $changenum = $1; print $q->start_form( -name => 'main_form2', -method => 'POST', -action => 'http://xxx.com/cgi-bin/perforce', -target => '_blank', ); print $q->hidden( -name => 'Submit', -value => 'describe', ); print $q->hidden( -name => 'changenum', -value => $changenum, ); print $q->submit( -name => 'submit_form2', -value => 'See the change', ); print $q->end_form;