in reply to can regex contains function?
Yes, it can. That's what /e is for.
$t =~ s/(?<=\s)(.)/uc $1/ge; [download]
But you don't need it here:
$t =~ s/(?<=\s)(.)/\U$1/g; [download]