justuptime.com - monitor your servers & websites

I want to use cookies ...

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

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.

-Troy May

PC Sympathy

Admin at HFT Online

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!!