From: Jacob Bachmeyer Date: Sun, 16 Oct 2022 04:15:45 +0000 (-0500) Subject: Replace file-reading loop with list operations X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c52369db7f39ad660b171800b5a2f24afc4a4490;p=gatekeeper.git Replace file-reading loop with list operations --- 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