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 reply to Re: serial barcode scanner + perl by jlongino
in thread serial barcode scanner + perl by BigGuy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.