in reply to split and capitalize regex

This seems to work.

$s = 'the_quick_brown_fox_jumps_over_the_lazy_dog'; $s =~ s[(.)([^_]*?)(?:_|$)][\U$1\E$2 ]g; print $s; The Quick Brown Fox Jumps Over The Lazy Dog $s = 'fred'; $s =~ s[(.)([^_]*?)(?:_|$)][\U$1\E$2 ]g; print $s; Fred

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!