PDA

View Full Version : Cookies in Perl


nishanth
January 11th, 2006, 07:06
Hello Friends,

Has anyone used cookies in PERL ?????
I dont mean the HTTP::Cookies.
But cookies using the library file cookie.pl

Below is the snippet that i use to set the cookies :

$email="test@domain.com";
unless (eval "require 'cookie.pl'"){&Error("$@");}
$Cookies{'email'}=$email;
&Set_Cookies('email',$email);

Below is the code that i use to rectrieve cookies.

unless (eval "require 'cookie.pl'"){&Error("$@");}
use vars %Cookies;
&Get_Cookie('email');


There is no compilation error, but the values are not being displayed when i print the variable $Cookies{'email'}.

Can anyone help me out a way if you are familiar with this.
Not many has posted regarding the usage of cookie.pl on the net. :(

Regards
Nishanth

nishanth
January 12th, 2006, 10:47
Hello,

Anoop Came over my system and fixed the issue for me.
He undefined a variable called $C_Exp_Date

Or in the main program included the line &Set_Cookie_Exp_Date('');
Alas everything worked.

Hats off to Anoop.

Regards
Nishanth