laziness, impatience, and hubris | |
PerlMonks |
Re: serial barcode scanner + perlby jlongino (Parson) |
on Oct 05, 2001 at 04:27 UTC ( [id://116874]=note: print w/replies, xml ) | Need Help?? |
I'm not sure exactly what you want, but your task is
similar to a few programs I've written in Basic and Pascal
(not in Perl yet). You'll probably want to modify your
program that reads the port to redirect that output to a
file (use "\n" to define one swipe as one file
record). Better yet write to a database of some sort that
also stores date/time of swipe and some autonumber key
(whatever you need). This process runs 24/7 if necessary.
Write another program that monitors the file/database for new/unprocessed records (keep a log of the records that you've successfully read/processed, or include a flag for that in each database record as well). You can run this at whatever terminal you want and echo the raw/processed results to the screen. As far as the monitor program is concerned, it doesn't know/care whether the input is coming straight from a port or file. Hope this helps. "Make everything as simple as possible, but not simpler." -- Albert Einstein
In Section
Seekers of Perl Wisdom
|
|