Re: Sort + Use of uninitialized value On Wed, Apr 25, 2007 at 01:37:24AM -0400, yitzle wrote: > Warning message: > Use of uninitialized value in numeric comparison (<=>) at ... >  > Code: > foreach (sort { $dHash{$b}{'VAL} <=> $dHash{$a}{'VAL'} } keys %dHash) { 		perhaps   foreach (sort { $dHash{$b}{'VAL'} <=> $dHash{$a}{'VAL'} } keys %dHash) { >  > How do I fix? Should my sort function be checking for variable > defined? What do I return on undefined? Owen --  To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.org http://learn.perl.org/