Showing posts with label End-of-file. Show all posts
Showing posts with label End-of-file. Show all posts

Saturday, February 6, 2016

Perl: Read a Character from Standard Input Until The End-of-file

Read a character from standard input until the end-of-file:

while (defined($char = getc())){
print $char;
}