Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

cookie value

by bigup401 (Pilgrim)
on Apr 14, 2015 at 07:45 UTC ( #1123367=perlquestion: print w/replies, xml ) Need Help??

bigup401 has asked for the wisdom of the Perl Monks concerning the following question:

if i have

$cookie = $cgi->cookie(-name => 'hello', -value => $hi, -expires => '+1m');

i can access the cookie in by -name

$id = $cgi->cookie('hello');

now how can i get cookie value

Replies are listed 'Best First'.
Re: cookie value
by Corion (Patriarch) on Apr 14, 2015 at 07:48 UTC

    Have you read the CGI documentation? It demonstrates how to retrieve the value.

    What do you get as result in $id and what did you expect?

      this is just a simple, there is no problem with cookie. its working well. bt i want to expand. how do u call cookie value instead of cookie name in other page or how do u get cookie value

        The documentation on cookies is quite explicit:

        To retrieve a cookie, request it by name by calling cookie() method without the -value parameter.

        I'm not sure where you have problems. Maybe you can show us the code and tell us where you get results that do not correspond to your expectations?

        Again, what value do you get in $id and what value did you expect?

        A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1123367]
Approved by hdb
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-05-23 03:04 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (81 votes). Check out past polls.