in reply to manipulating string

The method slice() in Bio::SimpleAlign probably does what you need. Check out the bioperl tutorial.