in reply to Efficient walk/iterate along a string
Perl is a tool that handles complicated string manipulations well, but it's not designed to handle individual characters near so well. For that you need something closer to the silicon like C. However, on a case by case basis it may be that you don't need to handle individual characters and instead can use index or a regex to do much of the heavy lifting. The alternative may be to invest the time in writing an XS module that provides an iterator to efficiently traverse a string returning a character at a time and providing the current index on demand.
True laziness is hard work