<br><br><div class="gmail_quote">2009/12/11 Sammuel Souza <span dir="ltr">&lt;<a href="mailto:sammuel.souza@gmail.com">sammuel.souza@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(...)<div>
<p>my $server_nome = $ENV{&#39;SERVER_NAME&#39;};</p>
<p>(vou pular algumas partes ir direto ao cookie)</p>
<p>my $c = new CGI::Cookie(-name    =&gt;  &#39;cseguranca&#39;,<br>                        -value   =&gt;  &quot;$seguranca_codigo&quot;,<br>                        -domain  =&gt;  &quot;$server_nome&quot;,<br>                        -expires =&gt;  &#39;+1M&#39;,<br>

                        -path    =&gt;  &#39;/&#39;,<br>                        -secure  =&gt;  0<br>                       );</p>
<p>print &quot;Set-Cookie: $c\n&quot;;<br><br>Ele nao gera o cookie na maquina cliente, verifiquei o <br>$server_nome esta pegando o ip da maquina 192.168.254.10<br>(...)<br>Ja fiz outro scritp só para gerar um cookie tmb não cria.</p>


<p>Alguem tem alguma sugestão?</p>
</div></blockquote></div>Acredito que o atributo &quot;domain&quot; não pode ser um ip.<br><br>Se você não especificar o domain, acho que vai ter o efeito parecido com o que você quer:<br><br><a href="http://search.cpan.org/~lds/CGI.pm-3.48/lib/CGI/Cookie.pm#USING_CGI::Cookie">http://search.cpan.org/~lds/CGI.pm-3.48/lib/CGI/Cookie.pm#USING_CGI::Cookie</a><br>
&quot;&quot;&quot;<br>2. domain<br><br>    This is a partial or complete domain name for which the cookie is valid. The browser will return the cookie to any host that matches the partial domain name. For example, if you specify a domain name of &quot;.<a href="http://capricorn.com">capricorn.com</a>&quot;, then Netscape will return the cookie to Web servers running on any of the machines &quot;<a href="http://www.capricorn.com">www.capricorn.com</a>&quot;, &quot;<a href="http://ftp.capricorn.com">ftp.capricorn.com</a>&quot;, &quot;<a href="http://feckless.capricorn.com">feckless.capricorn.com</a>&quot;, etc. Domain names must contain at least two periods to prevent attempts to match on top level domains like &quot;.edu&quot;. If no domain is specified, then the browser will only return the cookie to servers on the host the cookie originated from.<br>
&quot;&quot;<br><br><br>-- <br>Existe mais de uma maneira de chegar lá<br><br>Glauber Machado Rodrigues<br><br>skype: glauber.rodrigues<br>