Aren't you tying your leg to your cheek there by going through the array twice? :-/
It's irrelevant when the script is going to be thrown away two days later of course, but I'd never put any bets on that. "A little" sloppiness here and "a little" there and some more at another place tends to pile up faster than you notice..