T
Tony N.
I'm using the following code to print an array of hash refs. It seems
to me there should be a more concise way to do this. I don't like the
trailing \t or the extra line of code to get the \n. Any pointers
would be appreciated.
print "$_\t" for sort keys %{$rows[0]};
print "\n";
for my $row (@rows) {
print "$row->{$_}\t" for sort keys %{$row};
print "\n";
}
to me there should be a more concise way to do this. I don't like the
trailing \t or the extra line of code to get the \n. Any pointers
would be appreciated.
print "$_\t" for sort keys %{$rows[0]};
print "\n";
for my $row (@rows) {
print "$row->{$_}\t" for sort keys %{$row};
print "\n";
}