in reply to Having a "default" hash value!

You already have the keys to match, so why not match them? Then if it doesn't match, have a backup s///. (Also implementing graff's suggestion).
my $keys = join '|', keys %inst; my $prefix = 'something'; my $suffix = 'else'; s/(^.*<)\:($keys)>/$1\e[31m$2\e[0m>/ or s/(^.*<)\:([a-z]+)>/$1$prefix$2$suffix>/

-QM
--
Quantum Mechanics: The dreams stuff is made of