simplify code

main
Yanick Champoux 2023-08-26 12:50:48 -04:00
parent acc6a64388
commit e0ac19d7c0
1 changed files with 4 additions and 1 deletions

View File

@ -80,10 +80,13 @@ sub generate_output_table ($ts) {
}
# sort hash by the average and print to screen
return Text::SimpleTable::AutoWidth->new(
my $tbl = Text::SimpleTable::AutoWidth->new(
captions => [qw/ Computer GHZDaysPerDay /] );
foreach
my $key ( reverse sort { $ranks{$a} <=> $ranks{$b} } keys(%ranks) ) {
$tbl->row( $key, $ranks{$key} );
}
return $tbl;
}