<?xml version="1.0" encoding="windows-1252"?>
<node id="63680" title="How can I get just one character from STDIN?" created="2001-03-11 21:49:18" updated="2005-08-11 07:04:21">
<type id="1857">
categorized question</type>
<author id="11732">
QandAEditors</author>
<data>
<field name="doctext">
I want to capture a single character like the C function &lt;code&gt;getch()&lt;/code&gt;.  &lt;code&gt;$ch = &lt;STDIN&gt;&lt;/code&gt; and &lt;code&gt;$ch = getc()&lt;/code&gt; don't return until the user enters a trailing newline.  What method(s) are available for this?</field>
<field name="parent_node">
2661</field>
<field name="reputation">
6</field>
</data>
</node>
