I love the idea of using perl in this case, thanks! I was hoping for a cleaner alternative to shell loop...