speed up keyword lookups in perl