Yeah, I've been told the same: this is too tough for Perl, do it in some other language. I have more code I could show you, but I am taking stabs in the dark here. I think I will put this project away on a shelve somewhere. Hopefully, it won't gather too much dust. :)