$c = new CGI::Cookie(-name => 'login', -value => $login2, -expires => '+3M', -domain => '$domain', ); print header(-cookie=>[$c]); print "URI:http://$URL/"; #and tried print "Location:http://$URL/";