in reply to getting an auto carriage return on STDIN

So, basicaly you need to read whatever numbers come down the line quickly, even if they don't come with a <CR>, and then you have to ignore the text for a while.

I'd use something like this (warning: untested)

use Term:ReadKey; $str=""; while (need_more_data($str)) { $str.=ReadKey(0);} $bad_data=ReadKey(0.5); # fractional values are accepted here
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.