in reply to Named Sort Subs with Strict?

Your hashes are scoped within the first function there, and are not accessible outside of it. Either move them so they are global (like with 'use vars'), or scope the sort function within the caller (or at least within the same block as the variables themselves).
sub do_msalist { my (%country, %state, %msaname, @msakeys); sub by_americentric { $country{$b} cmp $country{$a} or $state{$a} cmp $state{$b} or $msaname{$a} cmp $msaname{$b} or $a <=> $b } foreach (sort by_americentric @msakeys) { ... } }
When dealing with Perl scoping issues, try to think less about how Perl might "see" the variables and think about where the variables are physically placed in the source code.