<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><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 class="im"><br>
<br>
if($keys >= $min and $keys <= $max){<br>
<br></div>
deveria ser if($keys >= $min && $keys <= $max){<br></blockquote><div><br></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>-- <br>Bruno C. Buss<br><a href="http://www.brunobuss.net" target="_blank">http://www.brunobuss.net</a><br>