From c52369db7f39ad660b171800b5a2f24afc4a4490 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Sat, 15 Oct 2022 23:15:45 -0500 Subject: [PATCH] Replace file-reading loop with list operations --- gatekeeper.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index b6cb6de..f4d3d0b 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1279,11 +1279,7 @@ sub read_directive_file { open (DIRECTIVE_FILE, "<", $directive_file) or ftp_abort("FATAL: open($directive_file) failed: $!"); my $cnt = 0; # Keep track of the order of directives... - while () { - my $line = $_; - $directive_file_contents .= $line; - push(@lines,$line); - } + $directive_file_contents = join('', (@lines = )); close (DIRECTIVE_FILE) or ftp_warn("close($directive_file) failed: $!"); # If we don't know whose project this file belongs to, because the -- 2.25.1