perl -pi.bak -e 's/( \w) /$1/g' file.dat