use && sempre e seja feliz, só use and quando você souber oque está fazendo.<div><br></div><div>o 'and' é praticamente o 'e' da nossa lingua, vc diz pro seu codigo 'faça isso, e isso', ele não é de comparação, embora faça isso também.</div>

<div><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 10:09 PM, Bruno Buss <span dir="ltr"><<a href="mailto:bruno.buss@gmail.com" target="_blank">bruno.buss@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br><br><div class="gmail_quote">2012/11/29  <span dir="ltr"><<a href="mailto:thiagoglauco@ticursos.net" target="_blank">thiagoglauco@ticursos.net</a>></span><div class="im"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Seu primeiro erro é o operador and. No documento perlop: $ perldoc perlop você vai descobrir o seguinte:<br>
<br>
 " Logical And<br>
     Binary "and" returns the logical conjunction of the two<br>
     surrounding expressions.  It's equivalent to && except for<br>
     the very low precedence.  This means that it short-circuits:<br>
     i.e., the right expression is evaluated only if the left<br>
     expression is true.<br>
[...]<br>
  C-style Logical And<br>
     Binary "&&" performs a short-circuit logical AND operation.<br>
     That is, if the left operand is false, the right operand is<br>
     not even evaluated.  Scalar or list context propagates down<br>
     to the right operand if it is evaluated."<br>
<br>
Logo, seu código<div><br>
<br>
if($keys >= $min and $keys <= $max){<br>
<br></div>
deveria ser if($keys >= $min && $keys <= $max){<br></blockquote><div><br></div></div><div>Eu devo ser muito estúpido... mas alguém que está falando isso (ja é o 3o), poderia fazer o favor de me explicar porque ele deve usar && no lugar do 'and' e qual diferença isso faz no caso deste if específico? E em quais situações deve-se usar o 'and' no lugar de &&?</div>



</div><div><br></div><div>[ ]'s</div><div class="HOEnZb"><div class="h5">-- <br>Bruno C. Buss<br><a href="http://www.brunobuss.net" target="_blank">http://www.brunobuss.net</a><br>
</div></div><br>_______________________________________________<br>
Rio-pm mailing list<br>
<a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="color:rgb(51,51,51);font-size:x-small">Saravá,</span></div>

<div><span style="color:rgb(51,51,51);font-size:x-small">Renato CRON</span></div><div><div style="text-align:right"><font size="1" color="#333333"><a href="http://www.renatocron.com/blog/" target="_blank">http://www.renatocron.com/blog/</a></font></div>

</div><div style="text-align:right"><font size="1" color="#333333"><a href="http://twitter.com/#!/renato_cron" target="_blank">@renato_cron</a></font></div><br>
</div>