Hello IB2017,
I agree with fellow Monk Anonymous Monk. You could use something like that:
#!/usr/bin/perl use strict; use warnings; use feature 'say'; use Net::Domain qw( hostfqdn hostdomain ); if (my $hostdomain = hostdomain) { say $hostdomain; } else { my $hostfqdn = hostfqdn; say $hostfqdn; }
Where you can get use the hostfqdn() method and you can identify and return the FQDN of the current host. By doing so you will get all public information at least. You can read more at the documentation Net::Domain.
Hope this helps, BR.
In reply to Re^2: Resolving DNS of local network
by thanos1983
in thread Resolving DNS of local network
by IB2017
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |