programming-examples/perl/CGI/Create cookie.pl

14 lines
274 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
use CGI;
$q1 = new CGI;
$cookie1 = $q1->cookie(
-name=>'FIRST_NAME', -value=>'Joe',
-expires=>'Fri, 30-Aug-2002 15:30:30 GMT;',
-path=>'/',
-domain=>'127.0.0.1');
print $q1->header(-cookie=>$cookie1);
print "Cookie Created ...";