Tutorials Point

Google
Web This Site

  Perl Home

  PERL Functions

© 2006 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL getc Function


Syntax

getc FILEHANDLE

getc


Definition and Usage

Reads the next character from FILEHANDLE (or STDIN if none specified), returning the value.

Return Value

  • undef on error or end of file

  • Value of character read from FILEHANDLE

Example

Try following example:

#!/usr/bin/perl

$key = getc(STDIN);
print "Entred value is $key\n";



Printer Friendly



  

Advertisement