programming-examples/perl/CGI/A Simple Cookie Example Using the CGI Module.pl

10 lines
205 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/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;