Perl script for elaborating names
Posted on 2015-01-06
hello, the question is simple. I've as input a file (say namesIN.txt) like this:
FIRST NAME Second Name
DOE John Charles
SMITH JASSIE Robert
and so on...in a word: the first names all capital, the second names with only the first letter capital.
I'd like to "insert" a character (say "|") to separate firsts and seconds, obtaining a new file (say namesOUT.txt) like this:
FIRST NAME | Second Name
DOE | John Charles
SMITH JASSIE | Robert
is it possible with a perl script?
all the best, thanks in advance,