Copyright © tutorialspoint.com
getc FILEHANDLE
getc
Reads the next character from FILEHANDLE (or STDIN if none specified), returning the value.
undef on error or end of file
Value of character read from FILEHANDLE
Try following example:
#!/usr/bin/perl $key = getc(STDIN); print "Entred value is $key\n";