I know Perl have the ucfirst function but I can't make it work properly when the string have more than one word.
I'm using the following routine I found in this forum that is giving me another problem: is the data contains latin caracters, the very next will be upper case.
ie. polêmica becames PolêMica
How to solve this using the routine OR ucfirst?
sub first($) {
$str = $_[0];
$str =~ s/(\b)(\w)/\U\2/g;
return $str;
}
I'm using the following routine I found in this forum that is giving me another problem: is the data contains latin caracters, the very next will be upper case.
ie. polêmica becames PolêMica
How to solve this using the routine OR ucfirst?
sub first($) {
$str = $_[0];
$str =~ s/(\b)(\w)/\U\2/g;
return $str;
}