Thank you for pointing this out. Sorry about posting as much of the script as I did. I wanted to be able to get my point across, but, as you stated, if it worked for 1 it would work for whatever the cap on a foreach loop is in perl =p
Thanks for your help! I ended up using your Foreach because it handled it the way I wanted.