> -----Original Message-----
> From: Stokes, John [mailto:[EMAIL PROTECTED]]
> Subject: Retrieving cookies
>
> I've figured out how to set a cookie, and I think I've retrieved it
> successfully (no errors, at least), but now how do I manipulate
> it? I can't
> figure out how to reference the cookie data.
>
> Here's an example of my code:
>
> use CGI;
> $q = new CGI();
> $myCookie = $q->cookie(-name=>'Fyre',
>                        -value=>test,
>                        -expires=>'+3M',
>                        -domain=>'.biola.edu');
> print $q->header(-cookie=>$myCookie);
>
> %cook = $q->cookie(-name=>'Fyre');
>

        You can reference your cookie with:

$cook{'Fyre'};

++========================================================================++
|| UNIREZ, Inc.                                            Scott Thompson ||
++-------------------------------------------+----------------------------++
|| Address: 2555 Southwest Grapevine Parkway | Title:     Programmer      ||
||          Suite 200                        | Phone:     (817) 416-5800  ||
||          Grapevine, Texas 76051           | Extension: 104             ||
|| Fax:     (817) 251-9199                   | Cell:      (972) 342-5660  ||
|| Web:     http://www.unirez.com/           | Email:     [EMAIL PROTECTED]||
++===========================================+============================++

Reply via email to