in reply to Re^3: Creating a hash from arrays
in thread Creating a hash from arrays
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Creating a hash from arrays
by AnomalousMonk (Archbishop) on Nov 02, 2013 at 23:30 UTC | |
|
Re^5: Creating a hash from arrays
by LanX (Saint) on Nov 02, 2013 at 23:32 UTC | |
|
Re^5: Creating a hash from arrays
by tangent (Parson) on Nov 03, 2013 at 16:53 UTC |