print map { tr/at/pl/r } grep { (ord) % 4 < 3 } sort split //, 'great';
You can change the width to suit the size area that you will be embedding to