$_ = 'a_c_code'; s{ ([^_]+) | (_) }' $2 ? " " : ucfirst $1 'gxe; print $_,$/; __END__ A C Code