note
SuicideJunkie
You wrote: <c>X or Y</c><br>
1) Y is evaluated when X is false<br>
2) X is empty (aka undef, aka false)<br>
1+2=3) Therefore Y (the die) is performed.<br><br>
So, what is the problem here? It is doing exactly what you told it to. If you want it to die on some other condition than the shift giving 0/undef/''/etc, then you need to specify that condition in your code.<br><br>
Try specifying what to shift: <c>$var = shift @array</c> to ensure you're shifting the right array.
726403
726408