On 4/24/07, yitzle <[EMAIL PROTECTED]> wrote:
Warning message:
Use of uninitialized value in numeric comparison (<=>) at ...
Code:
foreach (sort { $dHash{$b}{'VAL} <=> $dHash{$a}{'VAL'} } keys %dHash) {
How do I fix?
Give it an initialized value. Maybe like this?
sort { ($dHash{$b}{VAL} || 0) <=> ($dHash{$a}{VAL} || 0) } keys %dHash
Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/