Maybe I'm still just showing off, but I don't even use Ruby that often and it's pretty clear what that code does. Split the sentence into words, capitalize the first letter of each word, and re-join the words into a single string.
@sentence = @sentence.
split(' ').
map!{ |x|
x = x[0..0].upcase << x[1..-1]
}.
join(' ')
[Edit: Fixed code, thanks knodi123] map s {(\w+)} {\u$1}g, @sentence;
I'll give a dollar to anyone who already knows Perl and can tell me what the fuck is going on there.