in reply to map {} list or do {} for list?
%hosts = map { $hosts{$_} == $table_count ? ($_, $hosts{$_}) : ()} key +s %hosts; [download]