in reply to Structured Printing of Hash of Arrays
my @keys = sort keys %TOP; my $format = join(" ", ("%20s") x @keys)."\n"; printf $format, @keys; for my $line (0..$#{$TOP{$keys[0]}}) { printf $format, map {$TOP{$_}[$line]} @keys; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Structured Printing of Hash of Arrays
by tye (Sage) on Oct 12, 2000 at 01:44 UTC | |
by merlyn (Sage) on Oct 12, 2000 at 01:54 UTC | |
by merlyn (Sage) on Oct 12, 2000 at 01:58 UTC |