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


in reply to changing 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