in reply to Perl - write data from hashes
Are the keys in all the hashes always the same? If yes, here's an algorythm for you:
It could have been easier to print Name first it you didn't mix it with the other data. Edit: forgot to print "\n"for my $key ("Name", grep { $_ ne "Name" } keys %{$hashes[0]}) { print ((join "\t", $key, map { $_->{$key} } @hashes),"\n"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl - write data from hashes
by Happy-the-monk (Canon) on Oct 13, 2013 at 15:34 UTC |