use CGI; # ... my $cgi = CGI->new(); my $cookie = $cgi->cookie( -name => "nameDesCookie", -value => $wert, -path => "/", -expires => '+1d', );