Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: serial barcode scanner + perl

by jlongino (Parson)
on Oct 05, 2001 at 04:27 UTC ( [id://116874]=note: print w/replies, xml ) Need Help??


in reply to serial barcode scanner + perl

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://116874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found