Nice, I have similar techniques, but this one makes it real easy to clean up. I'll be sure to use this one. I think that if you write a short Perl program using REGEXP, you could scan through the document and remove all the lines with $DEBUG in it. That would seem to be the quickest way to clean up the file to me.