use strict; use CGI ":standard"; # Lots of logic that somewhere results in printing a header... print header(); # And THEN you try to redirect.... my $url = "http://Myserver/Travel/cgi-bin/A.cgi/"; print "Location: $url\n\n"; exit;