wrote:
> I am trying to replace a strings uppercase letters with a space upper
> case letter.
> For example, given the string "GeneralPartsList", I want to get the
> string " General Parts List".
>
> I tried:
>
> $mystring = "GeneralPartsList";
> if($mystring =~ /[A-Z]/) {
> $mystring =~ s/[A-Z]/ [A-Z]/g;
> }
>
> but I got an empty string.
Really? When I ran you program I got
[A-Z]eneral [A-Z]arts [A-Z]ist
which is what I would have expected.
What about a simple
$_ = "GeneralPartsList";
s/([A-Z])/ $1/g;
jue