Help for this page

Select Code to Download


  1. 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";
    
  2. 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
    
  3. or download this
    net::ifconfig eth0 addr is 192.168.0.1