Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
Here, to help some here are the basics of setting and reading cookie with Perl
Setting Cookies With Perl1.) Create a new CGI object
python
use CGI;
$cgi_query = new CGI;
2.) Create your cookie using the
cookie() method in Perl. In this example we will create a cookie named
SITE_COOKIE with a value of
SITE=http://www.example.com and it will expire in 24 hours. You use the
cookie() method before calling the
header() method
python
$cookie = $cgi_query->cookie(-name=>'SITE_COOKIE',
-value=>'SITE=http://www.example.com',
-expires=>'+24h',
-path=>'/');
3.) Create the HTTP header and print the doctype
python
print $cgi_query->header(-cookie=>$cookie);
Reading Cookies With Perl1.) Create a new CGI Object
python
use CGI;
$cgi_query = new CGI;
2.) Create the HTTP header and print the doctype statement
python
print $cgi_query->header;
3.) Start the HTML doc, and give the page a title
python
print $cgi_query->start_html('My cookie-get.cgi program');
4.) Retrieve the cookie. Do this by using the
cookie() method without the -value parameter.
python
print $cgi_query->h3('The cookie is ...');
$theCookie = $cgi_query->cookie('SITE_COOKIE');
Now you have a variable,
$theCookie that holds the name and value of your cookie. That should at least get you headed down the right path. Happy coding!
NOTE:I know all the code blocks were done in Python. I did this because there doesn't seem to be support for syntax highlighting for Perl, so I used Python for better syntax highlighting for my example code