Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

cookie value

by bigup401 (Pilgrim)
on Apr 14, 2015 at 07:45 UTC ( [id://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 1.pl

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

i can access the cookie in 2.pl 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-18 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found