hello perl gurus..
i have a short script i need to run to grab barcode scans into a variable which then checks if the scanned input is a number etc. what i need is to scan the barcode and get a carriage return automatically. also the auto CR needs to be done only if the STDIN is != "" and if there is a 1/2 sec delay after the scan so that no more accidental scans will be accepted..
following is my wild shot at it.. which obviously doesnt work..
print "Scan in Bar Code: "; if(<STDIN> == "") { print "\n"; } else { sleep(1/2); print "\r"; }
In reply to getting an auto carriage return on STDIN by perllearner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |