Yes, I was able to get the perl script to read the javascript cookie. However, the path had to be set when the perl script and the html page didn't have the same path. If you don't specify the path when the cookie is set by javascript, the current path is used. Since you didn't set it (SetCookie takes up to five params yet you only provide three, the fourth would be the path) it uses the current path. If the path of the perl script isn't below said path, the browser will not send the cookie.
For illustrative purposes:
These work:
HTML at: http://www.blah.com/page.html
Perl script at: http://www.blah.com/cookie.pl
HTML at: http://www.blah.com/page.html
Perl script at: http://www.blah.com/cgi-bin/cookie.pl
This doesn't work:
HTML at: http://www.blah.com/content/page.html
Perl script at: http://www.blah.com/cookie.pl
Of course if the perl script is generating the html content, the cookie should be picked up the next time you visit the script.
Hope this helps.
antirice The first rule of Perl club is - use Perl The ith rule of Perl club is - follow rule i - 1 for i > 1
|