$ paste file1 file2 | perl -lane 'print "@F[1,0,2,3]"' 1 a 6 11 2 b 7 12 3 c 7 13 4 d 8 14 5 e 9 23