Current Perl documentation can be found at

Here is our local, out-dated (pre-5.6) version:

Instead of sending back a Content-Type as the headers of your reply, send back a Location: header. Officially this should be a URI: header, so the module (available from CPAN) sends back both:


Note that relative URLs in these headers can cause strange effects because of ``optimizations'' that servers do.

    $url = "";;
    print "Location: $url\n\n";

To be correct to the spec, each of those "\n" should really each be "\015\012", but unless you're stuck on MacOS, you probably won't notice.