getc

How can I diagnose problems with Perl's getc?

I am having this strange problems with the getc function. I use getc to get a character from a socket file handler. I need to simulate message exchanges between pc and a mobile device. For the first few messages, getc works fine. But for this one, getc couldn't get anything from the socket. The whole Perl program blocked until I reset th...

getc Vs getchar Vs Scanf for reading a character from stdin

Of the below three functions: getc getchar & scanf which is the best one for reading a character from stdin and why? Are there any known disadvantages or limitations for any of these functions which makes one better than the other? ...