in reply to Fast lookup for prefixes in hash

Hmmm, this sounds like a job for Tie::RegexpHash. Give it a try :)