Perl Home
PERL Functions
© 2013 TutorialsPoint.COM
|
PERL endprotoent Function
Advertisements
Syntax
Definition and Usage
Tells the system you no longer expect to read entries from the protocols list using getprotoent.
Return Value
Example
Try out following example:
#!/usr/bin/perl
while(($name, $aliases, $protocol_number) = getprotoent()){
print "Name = $name\n";
print "Aliases = $aliases\n";
print "Protocol Number = $protocol_number\n";
}
setprotoent(1); # Rewind the database.
while(($name, $aliases, $protocol_number) = getprotoent()){
print "Name = $name\n";
print "Aliases = $aliases\n";
print "Protocol Number = $protocol_number\n";
}
endprotoent(); # Closes the database
|
|
Advertisements
|
|
|