in reply to Re: Search for a character in CAPS
in thread Search for a character in CAPS

You did not test your code. The character matched by the dot is being lost in the replacement. The following snippet:
my $agent = 'PerlBeginnerPerl'; $agent =~ s/.([A-Z])/ $1/g; print $agent;
produces: Per Beginne Perl

To make your approach work, you would need: $agent =~ s/(.)([A-Z])/$1 $2/g;

Replies are listed 'Best First'.
Re: Re: Re: Search for a character in CAPS
by c_lhee (Novice) on Mar 08, 2002 at 09:18 UTC
    The code definitely did work. Thanks a lot. c_lhee@yahoo.com