#!perl -p s!(.)(\1*)!(($",'',abc,def,ghi,jkl,mno,pqrs,tuv,wxyz)[$1]=~/./g)[length$2]!eg