in reply to Character positioning

Another trick is to use index. A quick tour of the Perl functions will likely give you a whole bunch of ideas. It's worthwhile reading, since it will build your understanding of what tools you have at your disposal.