in reply to ifconfig / ipconfig replacement

I've just recently taken up this project again, I dropped it back than and wrote the whole thing in sh. Now I'm adding network functionallity to it, so I must go back to perl. Here's how I got my list of interfaces/ip-addresses, as suggested previously, by using IO:Interface
#!/usr/bin/perl -w # # Test script voor interface informatie # by Djeezus 30/04/2004 # ------------------------------------- use IO::Interface; use IO::Socket::INET ; # must create socket first, bound to all interfaces $sock = IO::Socket::INET->new(Proto => 'udp'); # get list of active interfaces @iflist = $sock->if_list; print "List interfaces : @iflist\n"; # get list of active interfaces/addresses for $intf (@iflist) { $addr = $sock->if_addr(${intf}); # creating hash interface/address $addrlist{"$intf"} = "$addr"; } # all active interface/ipaddress # using 'key' => 'value' from created hash while (($key,$value) = each %addrlist ) { print "$key\t=>\t$value\n" }