Skip to content

Instantly share code, notes, and snippets.

@chrisice
Created October 1, 2014 19:28
Show Gist options
  • Select an option

  • Save chrisice/85cd4d45ab161d1aeba1 to your computer and use it in GitHub Desktop.

Select an option

Save chrisice/85cd4d45ab161d1aeba1 to your computer and use it in GitHub Desktop.
Get a list of the ip addresses on a server with perl
#!/usr/bin/perl
use IO::Interface::Simple;
my @interfaces = IO::Interface::Simple->interfaces;
for my $interfaces (@interfaces) {
print $interfaces->address . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment