From 7e7156bee2e03e6f5103b330c615387919faa94d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 30 Mar 2014 21:20:22 +0200 Subject: scripts: Localize $_ in functions with while (<$fh>) style loops This way we make sure we don't affect the $_ value for the caller, in case it was being used. --- scripts/Dpkg/Control/HashCore.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/Dpkg/Control/HashCore.pm') diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index 7d13286f8..6c1df0b80 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -186,6 +186,7 @@ sub parse { my $parabody = 0; my $cf; # Current field my $expect_pgp_sig = 0; + local $_; while (<$fh>) { s/\s*\n$//; -- cgit v1.2.3