If you're satisfied to limit yourself to just Linux you should be able to get away rather simply with parsing the output from ifconfig -a and looking for just those interfaces matching /^eth\d+/.
open( IFCFG, "ifconfig -a |" ) or die "Can't open pipe from ifconfig: +$!\n"; my %ifs; while( <IFCFG> ) { chomp; ## ... } close( IFCFG );
--
We're looking for people in ATL
In reply to Re: How to list all network interfaces and their ip address in Linux
by Fletch
in thread How to list all network interfaces and their ip address in Linux
by bahadur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |