require 'io/console'
#waiting for barcode scanner input (keyboard wedge, DATA+CR format)
#input = STDIN.noecho(&:gets).chomp
input="31P10AM000VUS"
case input
when '/\A31P/' #barcodes i scan have prefixes, 31P is one of them, 10AM000VUS is lenovo model type..
puts "You've scanned a Machine Type: #{input[3..13]}"
end