#!perl -w use strict; my $data1 = ; my @data2 = split(/(\S.)/, $data1); foreach my $thn (@data2) { $thn =~ s/(\S)(\S)/$2$1/; } print @data2; __END__ rpmehcia12b@gioftoc.mo