in reply to getting an auto carriage return on STDIN
I'd use something like this (warning: untested)
Note that with barcodes you usualy know if you should be receiving any more data or not: AFAIK, most barcodes for any given purpose are of a constant length.use Term:ReadKey; $str=""; while (need_more_data($str)) { $str.=ReadKey(0);} $bad_data=ReadKey(0.5); # fractional values are accepted here
|
|---|