in reply to Re: Insert Space between names
in thread Insert Space between names

You could fix your original code less invasively with

s/(?<!^)([A-Z])/ $1/g;

But [A-Z] only works for English, at most, and should be avoided.

s/(?<!^)(\p{Upper})/ $1/g;

Makeshifts last the longest.