can any tell me how to use cookies in perl[cool]
Feb 20, 2003, 1:43 AM
Veteran / Moderator (17364 posts)
Feb 20, 2003, 1:43 AM
Post #2 of 6
Views: 936
Basically to set a cookie;
# save the cookie...
print $IN->header( -cookie => $cookie );
And to read, something like;
Thats pretty much the simplest terms to put it in
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
my $cookie = $IN->cookie( -name => 'CookieName', -value => "whatever value of variable here", -path => '/', -expires => '+1y' ); # save the cookie...
print $IN->header( -cookie => $cookie );
And to read, something like;
Code:
my $cut_up = $IN->cookie('CookieName');Thats pretty much the simplest terms to put it in
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Feb 20, 2003, 2:25 AM
Veteran / Moderator (4108 posts)
Feb 20, 2003, 2:25 AM
Post #4 of 6
Views: 931
Feb 20, 2003, 2:29 AM
Veteran (19537 posts)
Feb 20, 2003, 2:29 AM
Post #5 of 6
Views: 927
See the CGI.pm docs for complete documentation.
http://stein.cshl.org/...oftware/CGI/#cookies
or simpler:
http://www.cs.unc.edu/...omp117_6/tsld017.htm
http://stein.cshl.org/...oftware/CGI/#cookies
or simpler:
http://www.cs.unc.edu/...omp117_6/tsld017.htm
Feb 20, 2003, 2:30 AM
Veteran / Moderator (17364 posts)
Feb 20, 2003, 2:30 AM
Post #6 of 6
Views: 925
Whoops....good point.
To define $IN, use something like;
$IN = new CGI;
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
To define $IN, use something like;
Code:
use CGI; $IN = new CGI;
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates


perl programming