You're iterating over an array that you are modifying at the same time. This is not a recommended approach and doesn't do what you want anyway:
foreach(@array){ shift (@array);
Most likely you want to keep on going while the array @array is not empty. Using a while loop is better for that.
In reply to Re: whats wrong with this code?
by Corion
in thread whats wrong with this code?
by purnak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |