home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
PERL4036.ZIP
/
gettest
< prev
next >
Wrap
Text File
|
1993-02-08
|
549b
|
21 lines
#!./perl
while (($name,$aliases,$addrtype,$length,@addrs) = gethostent) {
print $name,' ',$aliases,
sprintf(" %d.%d.%d.%d\n",unpack('CCCC',$addrs[0]));
last if $i++ > 50;
}
<stdin>;
while (($name,$aliases,$addrtype,$net) = getnetent) {
print "$name $aliases $addrtype ",sprintf("%08lx",$net),"\n";
}
<stdin>;
while (($name,$aliases,$proto) = getprotoent) {
print "$name $aliases $proto\n";
}
<stdin>;
while (($name,$aliases,$port,$proto) = getservent) {
print "$name $aliases $port $proto\n";
}