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

Re^3: Capitalize First Letter of Each Word

by fishbot_v2 (Chaplain)
on Jun 30, 2005 at 13:54 UTC ( [id://471316]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @a = ("a  sTrinG\n" );
    s#(.)(\w+ ?)#\U\1\L\2#g for @a;
    print @a;
    __END__
    a  string
    
  2. or download this
    s{ \b(\w+) }{\u\L$1}gx;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found