Signed-off-by: Francois Gouget fgouget@codeweavers.com --- foreach reads the whole file (converts it into a list that can be iterated) even if one exits the loop early with last. That would be confusing should we ever need to do so. So I think it's better to read files with while. --- winetest/build-patterns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index 6076d18ab..3c9b8aa84 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -677,7 +677,7 @@ if (open(my $fh, "-|", $cmd)) { my $index = 0; my ($commit, $build); - foreach my $line (<$fh>) + while (my $line = <$fh>) { chomp $line; if ($line =~ /^([0-9a-f]{40}) (.*)$/)