This isn't a use case for CGI::Lite, you aren't running a CGI script here. Consider the following:

#!/usr/bin/perl use WWW::Mechanize; use strict; use warnings; my $browser = WWW::Mechanize->new(); my $response = $browser->get('https://archive.org'); my $cookie_jar = $browser->cookie_jar(HTTP::Cookies->new()); $cookie_jar->extract_cookies( $response ); my $cookie_content = $cookie_jar->as_string; print $cookie_content;

Prints:

Set-Cookie3: PHPSESSID=ls6vbb4cqpeord3o1g96hmacg6; path="/"; domain=ar +chive.org; path_spec; discard; version=0 Set-Cookie3: abtest-identifier=ba42ec4d4af62f23e1645b2597f22eec; path= +"/"; domain=archive.org; path_spec; expires="2022-03-16 16:35:57Z"; v +ersion=0 Set-Cookie3: donation-identifier=d3bd1e3bebfa0105babd7b9ca4a9b5c4; pat +h="/"; domain=archive.org; path_spec; expires="2022-03-16 16:35:57Z"; + version=0

In reply to Re: PHP Sessions and Perl by marto
in thread SOLVED! PHP Sessions and Perl by bajangerry

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.