Welcome to WebmasterWorld Guest from 126.96.36.199
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.