If you
really want to read the cookie written by javascript, all you need is the CGI module and a little snippet of code.
-
#!/usr/bin/perl -T
-
-
use strict;
-
use warnings;
-
-
use CGI;
-
-
my $q = new CGI;
-
-
my $cookie = $q->cookie('theCookieName');
-
-
# Then if you want to do calculations with the cookie
-
#data the value of the cookie is stored in "$cookie" variable.
-
# CGI also has a redirect function:
-
-
print $q->redirect(-url=>'http://www.someurl.com');
-
-
# Or you can just print the location header manually.
-
-
print "Location: http://www.someurl.com\n\n";
-
-
It doesn't matter what you used to write the cookie, if there's a cookie there, and it is set to the proper domain,
IE: you will be reading the cookie from your cgi, or cgi-bin now with the referer.pl so you will want to make sure that it is
valid for that domain.
BUT!!!!!!!!
Did I say that loud enough?
You should listen to eWish, and use sessions, it's much better!!
Some browsers are able to modify what is sent as the $ENV{'HTTP_REFERER'}; variable.
CGI 101:
Never trust the user input, or the browser.
Please give us your code, and maybe we can help you a little better....