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

Depends on whether the string consists only of the name (or more precisely, starts with the name) or not. If it does then there's no extra space.

Replies are listed 'Best First'.
Re^4: Insert Space between names
by GrandFather (Saint) on Nov 21, 2005 at 02:33 UTC

    Following the stealth update that is true. When I commented, the code was:

    my $string = "JohnDoe"; $string =~ s/([A-Z])/ $1/g; print $string;

    DWIM is Perl's answer to Gödel