Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: What is the best way to capitalize a string?

( #22640=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > What is the best way to capitalize a string? contributed by chromatic

Try the internal function uc. To capitalize just the first character, try ucfirst. This has the additional benefit of respecting any locale you have set.

Comment on Answer: What is the best way to capitalize a string?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-11-28 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (192 votes), past polls