http://qs1969.pair.com?node_id=356049


in reply to Changing from full name to last, first mid

From the command line you could just do:
perl -p -i -e 's/^(.*?)\s*(\w+)\s*$/$2, $1\n/' list.txt
Update This is making the assumption that the names are on different lines, if they are on the same line then you are going to have a very hard time determining where one name ends an another begins

Replies are listed 'Best First'.
Re: Re: Changing from full name to last, first mid
by jillern (Initiate) on May 25, 2004 at 03:47 UTC
    The s/ code did it...I guess I need to look more at regular expressions...thank you gde
      With your help I created my first "useful" perl program...I'm so happy. I have found inter peace. gde