How to read cookie value in perl

by kalai 2009-08-12 11:24:57

you can read value set in the cookie using below code

use CGI;
$query = new CGI;
print $query->header;
print $query->start_html('My cookie-get.cgi program');
$theCookie = $query->cookie('MY_COOKIE');
print " $theCookie";
print $query->end_html;


In the above code value store in the variable 'MY_COOKIE' is
retrieved using $query->cookie() function and the value is returned when this code is executed

Tagged in:

1472
like
0
dislike
0
mail
flag

You must LOGIN to add comments