In that case just create a list of the keys with a defined VAL value before you do the sort:my @keys = grep defined $dHash{$_}{VAL}, keys %dHash; foreach (sort { $dHash{$b}{VAL} <=> $dHash{$a}{VAL} } @keys) { print $_, "\n"; } HTH, Rob
This solution appeals to me. I'll use it. Thanks! P.S. What's HTH? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/