This is how you capitalise the first letter in each word in perl:
my $v = 'hello mate'; $v = lc($v); $v =~ s/\b(\w)/\u$1/g;
Very very handy when you need to do validation.