$$_=lc=~y/aeiou//for@F;print"$$_ $_"for sort{$$b-$$a||$a cmp$b}@F #### -an print sort map y/aAeEiIoOuU//." $_\n",@F