programming-examples/perl/CGI/A Simple Cookie Example Using the CGI Module.pl
2019-11-15 12:59:38 +01:00

10 lines
205 B
Perl

#!/usr/bin/perl -T
use strict;
use CGI qw/:standard/;
my $cookie = cookie(-name=>'testcookie',-value=>'testvalue');
print header (-cookie=>$cookie);
print "You've received a cookie<p>\n";
exit;