I want to use cookies ...

They have: 32 posts

Joined: Jan 2001

Hi people,
I want to learn how to deal with cookies, I'm programming in Perl and I need to know how to set/get/delete cookies.
I understand how they work.
Please provide a code or tell me where can I read about using cookies.
Thanx! Smiling

Adolfo

tmay's picture

They have: 75 posts

Joined: Sep 2001

Use the CGI mod and go here to learn all about it.

tmay's picture

They have: 75 posts

Joined: Sep 2001

If you need exact help with a script, post back and we'll get you going. But the above link should be all you need.

merlin's picture

They have: 410 posts

Joined: Oct 1999

all you should need is that:

my $cookiename = "skincookie";
#cookie-stuff

my $cookie = cookie(
-NAME    => $cookiename,
-VALUE   => $list{'skin'},
        -PATH    => '/',
-EXPIRES => "+360d"
);
print "Set-Cookie: $cookie\n";   #set cookie

my $skinncookie = $query->cookie($cookiename); #read cookie
'

now you can do anything with $skincookie.

i hope it helps... Smiling

They have: 32 posts

Joined: Jan 2001

Hi friends,
Thanx a lot 4 your help!!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.