Actually, to amend this, now that I've read it a few days later, you typically use a hash mapped from 'value' to 'text', so if your structure is like the one above, you may have something like:
print $q->scrolling_list(
'-name' => 'acct_num',
'-values' => [ sort { $clients{$a} cmp $clients{$b} } keys %clients
+ ],
'-labels' => \%clients,
'-default' => $default_value
);
Or, if for some wacky reason, your values really are the values for your menu and the keys are the text labels:
print $q->scrolling_list(
'-name' => 'acct_nu',
'-values' => [ sort values %clients ],
'-labels' => { reverse %clients },
'-default' => $default_value
);
Typically, when using CGI, the first way is the way most commonly used. Most people don't keep around sorted copies of hashes. It defeats the purpose of a hash. Hashes inherently are unsorted because the algorithm they use to make their lookups fast stores them (internally) in an optimal configuration (which is almost never sorted).
My fault for not reading the original scrolling_list() call correctly.