- or download this
#!/usr/bin/perl -w
use strict;
...
# get info for my interfaces
eval { ($ip, $mask) = %{$Info->{"eth0"}{'inet'}}; }; warn $@ if $@;
print "net::ifconfig eth0 addr is $ip\n";
- or download this
Can't use an undefined value as a HASH reference at ./test.pl line 15.
net::ifconfig eth0 addr is 0.0.0.0
- or download this
net::ifconfig eth0 addr is 192.168.0.1