tcf22 has asked for the wisdom of the Perl Monks concerning the following question:
my ($buffer, $command); while(read(STDIN, $buffer, 1)){ #print "Read Character $buffer\n"; if($buffer eq "\t"){ ##Do command completion stuff last; }else{ $command .= $buffer; } } if($command eq "this"){ #Stuff }elsif($command eq "this"){ #More Stuff }...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Flushing STDIN after each character
by ChrisS (Monk) on Aug 15, 2003 at 15:22 UTC | |
|
Re: Flushing STDIN after each character
by wirrwarr (Monk) on Aug 15, 2003 at 15:45 UTC | |
by bbfu (Curate) on Aug 15, 2003 at 20:09 UTC |