From 3ada526b23eae5b27366cb60161a2e5e2615de73 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Sat, 26 Aug 2023 12:39:28 -0400 Subject: [PATCH] tighten the code --- script.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/script.pl b/script.pl index a40a9ed..2f32270 100644 --- a/script.pl +++ b/script.pl @@ -42,14 +42,10 @@ sub get_mersenne_results() { } sub extract_first_table ($html) { - $html =~ s/\n//g; - - my $te = HTML::TableExtract->new( depth => 0, count => 2 ); - - $te->parse($html); - - return $te->first_table_found; - + return HTML::TableExtract + ->new( depth => 0, count => 2 ) + ->parse( $html =~ s/\n//gr ) + ->first_table_found; } sub generate_output_table ($ts) {