in reply to
It has the look of good code (I believe one can "sense" this from just a casual glance, based on the shape, aesthetics, and recognizable idioms, but that's a topic for another node). You did, however, hit on one of my pet peeves, which is to place a nontrivial, static data structure definition in the body of a subroutine (my %map in sub dsi_dsn). I would turn %map into a file-scoped lexical, or create a new enclosing scope to contain it outside of dsi_dsn.
s aamecha.s a..a\u$&owag.print