Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Changing from full name to last, first mid

by fletcher_the_dog (Friar)
on May 24, 2004 at 21:14 UTC ( #356049=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://356049]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-08-15 07:54 GMT
Find Nodes?
    Voting Booth?

    No recent polls found