perl library to rewrite strings based on string prefixes