$string = "thisisatest"; for($x=0;$x<(length($string)-1);$x++){ $temp = $string; substr($temp,$x,1) = substr($string,($x+1),1); substr($temp,($x+1),1) = substr($string,$x,1); print $temp, "\n"; } #### htisisatest tihsisatest thsiisatest thiissatest thissiatest thisiastest thisistaest thisisaetst thisisatset thisisatets #### ($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;