Hey thanks guys. All your comments really helped me out!!
I've learned not to call external programs if I dont have to, and use internal perl functions, as they seem to be a -lot- more effective in getting things done.
Again, thanks a lot for your help!