Easiest:
my $file = "/etc/resolv.conf";
open(my $fh, "<", $file) or die "Can not open $file: " . $!;
my @dns;
while (<$fh>) {
  next unless /nameserver +([0-9\.]+)/;
  push @dns, $1;
}

On Fri, Jul 12, 2013 at 2:31 AM, Frank Vino <vinofra...@gmail.com> wrote:
> Could you please let me know the perl script how to find DNS IP address of
> system.?
>
> Thanks,
> -Vino

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to