in reply to redirecting to a local file

If by "local file" you mean a file on the client's machine, you can use the "file:" url scheme:
print "Location: file://c|/testfile.txt\n\n";
Will redirect the browser to c:\testfile.txt

Replies are listed 'Best First'.
Re: Re: redirecting to a local file
by Anonymous Monk on May 14, 2003 at 16:12 UTC
    I tried that, but IE is printing "server not found" and Mozilla is displaying a "Your page has move here" error page.

    very strange. It used to work.
      Are you sure you're using the colon after Location as in Thelonius's example?
      print "Location: file://c|/testfile.txt\n\n";
      In your initial question you use print "Location $url\n\n";

      Just checking that hasn't been overlooked!