in reply to Hash entries starting with a given string.

One possible solution is to build your hash as a tree (that is a nested hash) in the first place:
my %freq = ( aa => { a => 5, b => 2, c => 8, ... }, ab => { ... }, );

You can then get all two letter prefixes with a simple hash access. If you want to access one-letter prefixes as well, nest beginning from the first level instead.