From acce4015c36df83fb7ed8f48860aa1a3bef6e64a Mon Sep 17 00:00:00 2001 From: mitty Date: Sat, 19 May 2012 01:16:33 +0000 Subject: [PATCH] * replace outdated coding style * || -> or * open with bare word file handle git-svn-id: https://lab.mitty.jp/svn/lab/trunk@144 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- misc/dnsbench.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/dnsbench.pl b/misc/dnsbench.pl index d5d2008..65bdbdb 100644 --- a/misc/dnsbench.pl +++ b/misc/dnsbench.pl @@ -5,7 +5,7 @@ use warnings; use Net::DNS; -my $hostlist = shift @ARGV || die "usage: $0 list_of_hosts [nameserver]"; +my $hostlist = shift @ARGV or die "usage: $0 list_of_hosts [nameserver]"; if (! -r $hostlist) { die "$0: cannot read $hostlist"; } @@ -24,8 +24,8 @@ else { } -open LIST, "<$hostlist"; -while (my $host = ) { +open my $list, '<', $hostlist or die "$0: filename: $!"; +while (my $host = <$list>) { chomp $host; my $query = $res->send($host); if ($query) { -- 1.7.9.5