Your solution may lie within the
IO::Interface module (if those already offered are not to your liking) - This module gives you access to a wealth of information about network interface configurations. For example, from the documentation ...
use IO::Socket;
use IO::Interface qw(:flags);
my $s = IO::Socket::INET->new(Proto => 'udp');
my @interfaces = $s->if_list;
for my $f (@interfaces) {
print "interface = $if\n";
my $flags = $s->if_flags($if);
print "addr = ",$s->if_addr($if),"\n",
"broadcast = ",$s->if_broadcast($if),"\n",
"netmask = ",$s->if_netmask($if),"\n",
"dstaddr = ",$s->if_dstaddr($if),"\n",
"hwaddr = ",$s->if_hwaddr($if),"\n";
print "is running\n" if $flags & IFF_RUNNING;
print "is broadcast\n" if $flags & IFF_BROADCAST;
print "is p-to-p\n" if $flags & IFF_POINTOPOINT;
print "is loopback\n" if $flags & IFF_LOOPBACK;
print "is promiscuous\n" if $flags & IFF_PROMISC;
print "is multicast\n" if $flags & IFF_MULTICAST;
print "is notrailers\n" if $flags & IFF_NOTRAILERS;
print "is noarp\n" if $flags & IFF_NOARP;
}