simplify code
This commit is contained in:
parent
acc6a64388
commit
e0ac19d7c0
@ -80,10 +80,13 @@ sub generate_output_table ($ts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# sort hash by the average and print to screen
|
# sort hash by the average and print to screen
|
||||||
return Text::SimpleTable::AutoWidth->new(
|
my $tbl = Text::SimpleTable::AutoWidth->new(
|
||||||
captions => [qw/ Computer GHZDaysPerDay /] );
|
captions => [qw/ Computer GHZDaysPerDay /] );
|
||||||
|
|
||||||
foreach
|
foreach
|
||||||
my $key ( reverse sort { $ranks{$a} <=> $ranks{$b} } keys(%ranks) ) {
|
my $key ( reverse sort { $ranks{$a} <=> $ranks{$b} } keys(%ranks) ) {
|
||||||
$tbl->row( $key, $ranks{$key} );
|
$tbl->row( $key, $ranks{$key} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $tbl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user