Help for this page
$old_db="emdb1"; $new_db="kuku"; ... $str_regexp = "\$1\$2\$3${new_db}," ; $string=~s/([^,]*,)([^,]*,)([^,]*,)([^,]*,)/$str_regexp/e; print "${string}\n";