solved... stumbled across the fact that there were non printable characters in my regsub statement. They didnt show up in vi even when using :set list so I dont know what they were. now to see whether I can to TLS.... thanks for all the help GREG -- Greg Matthews iTSS Wallingford 01491 692445