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 <[email protected]> wrote: > Could you please let me know the perl script how to find DNS IP address of > system.? > > Thanks, > -Vino -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
