Your skill will accomplish what the force of many cannot |
|
PerlMonks |
getc vs readlineby Anonymous Monk |
on Nov 30, 2019 at 15:14 UTC ( [id://11109483]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use both getc (for single chars) and readline (for more than one char) to capture user input in a script. I usually just use <STDIN> but want to expand my horizons, plus getc avoids a chomp. But using getc prevents subsequent calls to readline from waiting for input! Why does it do that? For example:
The result: readline> x x getc> x x readline> WTF
Back to
Seekers of Perl Wisdom
|
|