use CGI qw/:standard/; use CGI::Cookie; my %CookieVars = ( ISAUTH => $ActualCookieVars{ISAUTH}, USERNAME => $ActualCookieVars{USERNAME}, AUTHLEVEL => $ActualCookieVars{AUTHLEVEL}, MYNUMBER => "$mynumber" ); # set cookie to the user my $cookie1 = new CGI::Cookie( -name=>'Test', -value =>\%CookieVars, # var to be sent -expires=>'+1h', # time to expire -domain=>"teste.com", # domain -path=>'/', #option path -secure=>0 # no ssl );