for (sort keys %tmp) { next if @{$tmp{$_}} < 2; say join "\t$_\t", reverse @{ $tmp{$_} }; }