Welcome to WebmasterWorld Guest from 220.127.116.11
The mail scripts (perl as well) work without any issues. The site is using the old searchem.pl script if you're familiar with that.
Please just let me know what additional information you might need. I apologize for my ignorance, as my forte is server side maintenance, not programming.
check your HTTP Response document for HTTP headers.
the redirection url should be in a Location: header.
perhaps the script or server is returning headers for a HTML document response before the Location header is written.