# perl CGI to send a 302 Found response to caller plus setting # a cookie with name=XYZ123 and value 1. # the REDIRECT_URL points to the script described further below # hosted at my server. use strict; use warnings; use CGI; use CGI::Cookie; my $REDIRECT_URL = 'http://fotomazi.eu5.net/bin/200.cgi'; my $cgi = CGI->new; my $cookie = $cgi->cookie( -name=>'COOKIE302', -value=>'1', -expires=>'+4h', -path=>'/' ); print $cgi->redirect( -uri=> $REDIRECT_URL, -cookie => $cookie, -status=>302 ); exit(0); 1; __END__