Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL endprotoent Function



Syntax

endprotoent


Definition and Usage

Tells the system you no longer expect to read entries from the protocols list using getprotoent.

Return Value

  • None

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


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names