http://qs321.pair.com?node_id=40014


in reply to Capitalize first letter in a string?

You can use the ucfirst function to do this. Assuming you want to uppercase the first character in a string:
$string = "to my beloved wife"; $string = ucfirst $string; print $string;
This will print "To my beloved wife". You shouldn't have to test for lowercase as ucfirst will not mangle any characters already in uppercase.

Autark.