note
liverpole
There's an idiom I often use when I want to ignore <i>undefined</i> values: <c>($variable || 0)</c>.
<p>You could use that in your code like this:
<c>
last if ($need[$incr] || 0) eq '';
</c>
<p>Simply put, that means: "last if <c>$need[$incr]</c> is undefined <b>-or</b> false".
<p>It works well when you want to temporarily map undefined values to <c>false</c> for the purposes of a test.
</p><p><b>Update</b>: Having said that, I want to point out that what others have said above about your <c>for(;;)</c> loop is correct, it is unconventional, and might give you problems if you were iterating over a list which potentially had <c>false</c> values in it. It's important that you understand <i>why</i> you are getting any warnings, and only "workaround" them once you're convinced that it's appropriate to do so.
<div class="pmsig"><div class="pmsig-465654">
<hr />
<font size="1">
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
</font>
</div></div>
581661
581661