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