First, you're executing the script fine, you could also use exec cgi but the result is the same.
I think I see the problem, rather that displaying the result of the script you are actually including the form which them executes and presents the results in a new page. Is this correct?
I guess...