s/^(.*)+([^ ]+)$/$2, $1/; #$1 is anything that starts is 1st name so /^(.*) and $2=anything else after