in reply to CGI and Redirect/URI/Location

You might try:

# cookie stuff precedes use CGI; my $cgi = new CGI; $|=1; print $cgi->redirect(-cookie=>[$c], -uri=>"http://$URL/", # and possibly -nph=>1, );

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: CGI and Redirect/URI/Location
by LeGo (Chaplain) on Jun 19, 2001 at 02:28 UTC
    Just curious as to what difference $| being set to 1 makes in this code.

    LeGo

      That sets autoflush on STDOUT, meaning that 'print "foo";' is sent promptly. In most cases your script will end right after the redirect call, but for long-running scripts it's a courtesy to the client.

      After Compline,
      Zaxo