in reply to Thinkin' Perl in C++

If that rather old version of MS's C++ provided ATL with CStringT accessed using #include <atlstr.h> you can use CStringT::Replace to replace instances of a substring with another substring in a string. This seems not to be available with MFC's CString however.

True laziness is hard work