On Mon, 14 Nov 2005, S, karthik (IE03x) wrote: > my $username = 'name'; > my $cookiereplace = "Set-Cookie: username=$username; expires= \n"; > print $cookiereplace > > print header; > .... > #print htmls > .... > > To unset the cookie : > > my $cookiereplace = "Set-Cookie: username='';";
Okay, that's a start, thank you. Now, please, can you point out the documentation you were reading that led you to believe that this would do anything useful? I have a hunch you may have mis-read something :-) Here's a hint: among a great many other ways to do this, the CGI.pm module has built-in methods to handle this for you. Look up for the cookie sections of the CGI perldoc; an online version is here: http://perldoc.perl.org/CGI.html#HTTP-COOKIES Additionally, higher-level modules like CGI::Application do a lot of the work needed to make you forget that cookies are even necessary. Documentation on it is available at http://search.cpan.org/~markstos/CGI-Application/lib/CGI/Application.pm But if you just want to do things the old-fashioned way with raw cookies, don't roll your own code to do this when it's a problem that has been solved a hundred thousand times now -- just let CGI.pm do it. -- Chris Devers 0%T [EMAIL PROTECTED]
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>