1 while $name =~ s/(^| )(.)( |$)/$1$2\.$3/; [download]
In reply to Re: simpler regex by borisz in thread simpler regex by rsiedl