Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Search for a character in CAPS

by dvergin (Monsignor)
on Mar 07, 2002 at 16:58 UTC ( [id://150057]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://150057]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found