use IO::Interface::Simple; my $if1 = IO::Interface::Simple->new('eth0_or_your_if_name'); print $if1->address, "\n";