Splitting Names
I need help generating code that will take the following examples and return separate elements.
“John Q Smith”
“John Smith”
I need to have an element for each first middle and last name. The problem I run in to is if the name does not contain a middle initial.
This code I am using will return the last name to element 1 if there is no middle initial. Any help, I am going loopy...
I need help generating code that will take the following examples and return separate elements.
“John Q Smith”
“John Smith”
I need to have an element for each first middle and last name. The problem I run in to is if the name does not contain a middle initial.
Code:
my @name_parts = split (/\s+\/,$dncprep[0],3);
This code I am using will return the last name to element 1 if there is no middle initial. Any help, I am going loopy...