I wouldn't go so far as 'perfect'
say Fname= "Dan", SName="Srobe"
SQL returns: "Dan_Srobe"
say Fname= SName="Dansrobe"
SQL returns: "_Dansrobe", when I'm guessing you would want "Dansrobe" with no space "_".
It becomes more of a problem if you want to build a name from say Title,FName,SName,Qualifications where you could end up with
"__Dansrobe_"
still if it works appropriately then maybe it is "perfect" after all.