in reply to Re: Improve My Code...
in thread Improve My Code...

I initially used foreach(@array){...} instead of while(@array){ ... shift(@array)} but changed it because I was getting booted from the server after a few hundred iterations, and was planning on restarting the loop from the current iteration. As it turned out, the problem was on my end of the connection, so I never needed to implement that and just never went back to foreach. Why though is it superior to while in this case?