in reply to CGI PERL - session/cookie set up and redirect

Here's an example of how to set a cookie and redirect a browser, using CGI:
use CGI (); my $cgi = CGI->new(); my $cookie = $cgi->cookie(-name => 'test', -value => '1'); print $cgi->redirect(-uri => 'http://www.perlmonks.org/', -cookie => $ +cookie);

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: CGI PERL - session/cookie set up and redirect
by jays01 (Initiate) on Jul 24, 2006 at 18:15 UTC
    Thanks. Till now I am depending on expiration of cookie and trying to change the cookie value to null. Instead of that now I am changing the cookie value to 'none'. Now I can able to find the change without refreshing the page. Thanks for ur help. But same question, can we use session object and try to do the redirection? Any suggestions?