in reply to Re: Transposition of each letter pair in string
in thread Transposition of each letter pair in string

map in void context? For shame. I don't think the original poster was asking for a golfed solution either. Other than that, the following (substr($t,$_,1),substr($t,$_+1,1))=(substr($t,$_+1,1),substr($t,$_,1)); is equivalent to but harder to read than substr($t, $_, 2) = reverse substr($t, $_, 2); From there it's any easy step to $_ = reverse $_ for substr($t, $_, 2);

Makeshifts last the longest.