in reply to Re: Re: Upper case first letter of each _ delimited word
in thread Upper case first letter of each _ delimited word

That's a nice solution, but but I think it is missing a couple features: it doesn't catch the first word in the string; it doesn't lowercase the rest of each word; and it doesn't allow variable-width delimiters. Here's a modified version that addresses those issues.
sub ucwords { my($new, $delim) = @_; $new =~ s/($delim|^)(.*?)(?=$delim|$)/$1\u\L$2/sg; $new; }
To match an entire word, from one delimiter to the next, I used a non-greedy match and a positive lookahead.