wolverina has asked for the wisdom of the Perl Monks concerning the following question:

Looking for info on using perl to read javascript cookies. Any links perhaps..? Lisa.

Replies are listed 'Best First'.
Re: reading javascript cookies
by The Mad Hatter (Priest) on Oct 26, 2003 at 00:53 UTC
    Assuming they're already set, you read them just like any other cookie. I'd suggest reading the docs of CGI::Cookie. Something like this would work:
    use CGI::Cookie; # fetch existing cookies %cookies = CGI::Cookie->fetch(); print $cookies{'cookie_name'}->value;
    If you are already using CGI.pm, you should just use the cookie methods it provides (see the doc).
Re: reading javascript cookies
by jdtoronto (Prior) on Oct 26, 2003 at 01:47 UTC
    A cookie is a cookie, doesn't matter how it got written. If you ahev the authority to read it you can read it.

    CGI or CGI::Cookie modules will give the best explanation.

    jdtoronto

Re: reading javascript cookies
by Cody Pendant (Prior) on Oct 26, 2003 at 02:30 UTC
    As others have said, a cookie is a cookie whether set by Javascript or any other technology.

    You might mean "how do I get a perl/LWP virtual browser to store cookies set by Javascript?" -- is that the question?



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print