Brilliant! Thanks for the reply. I wanted to do it with awk but I couldn't figure out how to pass it multiple files. The problem was, I was making a system command call from perl and thought it was interpreting using csh instead of bash... come to find out, it was interpreting with the "sh" shell