From 41ba29d218415a817b083fae5e1deeaa7de1fc79 Mon Sep 17 00:00:00 2001 From: Dan Church Date: Mon, 4 Sep 2023 10:08:00 -0500 Subject: [PATCH] Remove Perl 4 sigils (PBP) --- make-block.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/make-block.pl b/make-block.pl index 315dfd8..64cebfb 100755 --- a/make-block.pl +++ b/make-block.pl @@ -25,7 +25,7 @@ my $skip = 0; my $removed_allowed = 0; sub add_domain_list { my $file = shift; - foreach my $line (&read_stripped($file)) { + foreach my $line (read_stripped($file)) { my $domain = lc $line; ++$dupes if defined $domains{$domain}; $domains{$domain} = 1; @@ -34,7 +34,7 @@ sub add_domain_list { sub add_host_file { my $file = shift; - foreach my $line (&read_stripped($file)) { + foreach my $line (read_stripped($file)) { my @parts = split /\s+/, $line; die "Malformed line in $file: $line; @parts" unless @parts > 1; @@ -71,7 +71,7 @@ MAIN: { my $block_ip = '0.0.0.0 ::'; my $workdir = $FindBin::RealBin; - unless (&GetOptions( + unless (GetOptions( 'out=s' => \$out, 'O=s' => \$out, 'i=s' => \$block_ip, @@ -85,16 +85,16 @@ MAIN: { my @allow_lists = glob "$workdir/allowlists/*.domains"; foreach my $listfile (@domain_lists) { - &add_domain_list($listfile); + add_domain_list($listfile); } foreach my $hostfile (@hosts_lists) { - &add_host_file($hostfile); + add_host_file($hostfile); } # Apply allowlists my @allow_domains; foreach my $allowlist (@allow_lists) { - push @allow_domains, &read_stripped($allowlist); + push @allow_domains, read_stripped($allowlist); } my $before = %domains; delete %domains{@allow_domains};