Referring to the CGI
documentation, the following example is presented.
$cookie = $query->cookie(-name=>'sessionID',
I would recommend that you read the pod for CGI
and use the code presented there. As a pointer, I would stick to the CGI
module and not use CGI::Cookie
. I say this as I've had no end of problems with CGI::Cookie
in the past that disappeared once CGI
was used instead.
Note that the code example assumes you have already created a CGI query object.
Hope that helps.