From 352d0b740217c84a9980d3740eb486bed4cb01ad Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Sat, 26 Aug 2023 11:13:06 -0400 Subject: [PATCH] use /r to substitute in place --- script.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/script.pl b/script.pl index 03ab87e..1ba4f91 100644 --- a/script.pl +++ b/script.pl @@ -59,10 +59,8 @@ sub generate_output_table ($ts) { foreach my $row ( $ts->rows ) { foreach my $cell ($row) { my $machine = @$cell[0]; - my $ghz_days = @$cell[6]; - $ghz_days =~ s/\s//g; - my $days = @$cell[4]; - $days =~ s/\s//g; + my $days = @$cell[4] =~ s/\s//gr; + my $ghz_days = @$cell[6] =~ s/\s//gr; if ( $days > 0 ) { my $perf = $ghz_days / $days;