sort_and_print_hash_keys(%letters); # you passed a hash variable not a hash ref.