in reply to Transposition of each letter pair in string

Hello, Here is my suggestions..
$string = "thisisatest"; @a=split //,$string; foreach (0..(@a-2)) { ($a[$_],$a[$_+1])=($a[$_+1],$a[$_]); print @a."\n"; ($a[$_],$a[$_+1])=($a[$_+1],$a[$_]); }
Ciao, Gregor (Edit: forgot newline)