print "Location: /xyz/foo.txt\n\n"; #### use CGI; my $q = new CGI(); print $q->redirect("/xyz/foo.txt");