in reply to Re: split hash into two columns
in thread split hash into two columns
Maybe1 7 2 8 3 9 4 10 5 11 Use of uninitialized value in printf [...]. 6
my @keys = sort { $hash{$b} <=> $hash{$a} || $b cmp $a } keys %hash; my $half = int($#keys / 2); printf "%s\t%s\n", @keys[$_, $_+$half] for 0 .. $half-1; printf "%s\n", $keys[$#keys] unless $#keys % 2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split hash into two columns
by Anonymous Monk on Mar 27, 2006 at 20:30 UTC | |
by ikegami (Patriarch) on Mar 27, 2006 at 20:41 UTC |