diff --git a/make-block.pl b/make-block.pl index d6d29c4..43d2fd1 100755 --- a/make-block.pl +++ b/make-block.pl @@ -18,7 +18,7 @@ use strict; use warnings; use Getopt::Long qw/ GetOptions :config no_ignore_case /; -use File::Basename qw/ dirname /; +use FindBin qw//; my %domains; my $dupes = 0; @@ -69,7 +69,7 @@ sub add_host_file { MAIN: { my $out; my $block_ip = '0.0.0.0 ::1'; - my $workdir = &dirname($0); + my $workdir = $FindBin::RealBin; unless (&GetOptions( 'out=s' => \$out,