my ($i, $j); foreach my $value (sort {$statefinal{$i} cmp $statefinal{$j}} keys %st +atefinal) { print "$value $statefinal{$value}\n"; }
That code was suppose to sort by values, but I'm just getting a lot of uninitialized values errors when I run it. It's not sorting by values (states).
In reply to Re^4: Creating a hash from arrays
by cspctec
in thread Creating a hash from arrays
by cspctec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |