You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/perl
|
|
|
|
while ( ($name, $aliases, $addrtype, $length, @addrs) =gethostent ){
|
|
($a, $b, $c, $d) = unpack ( 'C4', $addrs[0]);
|
|
print "The name of the host is $name.\n";
|
|
print "Local host address (unpacked) $a.$b.$c.$d\n";
|
|
} |