@a = (); $_ = 'abbcccddddeeeeeffffffggggggghhhhhhhhiiiiiiiiijjjjjjjjjj'; foreach $digit (a..j) { push @a, eval "tr/$digit/x/"; }