use IO::Interface::Simple (); for my $if (IO::Interface::Simple->interfaces) { next if !$if->is_running || $if->is_loopback || !defined($if->address); print $if, "\t", $if->address, "\n"; }