Hello List,
This is probably blatently stupid of me but here goes:
I set a simple cookie using CGI::Cookie like so:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Cookie;
my $cd = param('cd');
if($cd) {
my $c = new CGI::Cookie(
-name => 'cd',
-value => $cd,
-expires => '+3M',
-domain => '.mydomain.net',
-path => '/',
);
print "Set-Cookie: $c\n";
}
print "Location: http://www.mydomain.net/\n\n";
Then I try to fetch it later with:
use CGI::Cookie;
my $c = fetch CGI::Cookie;
print $c{'cd'};
That print statement OUTPUTS
cd=whatever; path=/
why isn't it just 'whatever', did I set the cookie wrong?
I can get the right value, IE 'whatever', by doing a split on it but I'd like to avoid
me parsing it
since as you can probably tell I'm an idiot!
>From the command line I get:
~$ ./public_html/enter.cgi 'cd=whatever'
Set-Cookie: cd=whatever; domain=.mydomain.net; path=/; expires=Sun, 07-Sep-2003
20:50:18 GMT
Location: http://www.mydomain.net/
~$
TIA for any input!
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]