in reply to 301 Redirect using Perl

The status number must go in the HTTP response, not just in a header. The easiest way is to use CGI and call its redirect method.

Phil