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 }...