#!/usr/bin/perl # Anagram # See also http://perlmonks.org/?node_id=268855 $_="just another technical yahoo!";@b=sort{rand cmp rand}@a=split//;$|= print"\ec";print@b;sub p{print"\e[$_[1];$_[0]H$_[2]"}while($e=$a[$g++]){ $f=0;{redo if$b[$f++]ne$e}$b[$f-1]=0;p($f,1,$");$i=$f-$g<0?1:-1;while($f !=$g){select$q,$q,$q,p($f,2,$e)/20;p(($f+=$i)-$i,2,$")}p($f,3,$e.$/)}