Hi Guys

I am trying to write a script that reads in a constant stream of HEX lines and writes them out to screen in a (sort of) ascii table

_______________________ 0CFFE000|00|00|00|00|00|00|00|00| ----------------------- 18FEF501|00|00|00|00|00|00|00|00| ----------------------- IDENTIER| 8 sets of HEX bits | -----------------------
As it is streaming data I need to keep the identifier static and just update the bits as they come in. The data comes through like this:
12345678:123 0CFFE000 00 00 00 00 00 00 00 00 87654321:321 18FEF501 00 FF 32 C4 FF 00 00 00 43215678:132 0C11FF00 FF FF FF FF FF FF FF FF 12348765:312 18FFE100 23 E0 C1 0E FF 00 AC 00 43218765:112 00000000 01 FF FF FF FF FF FF FF 12345678:123 0CFFE000 01 00 00 00 00 00 00 00 87654321:321 18FEF501 00 00 00 00 00 00 00 00 43215678:132 0C11FF00 00 00 00 00 00 00 00 00 12348765:312 18FFE100 00 00 00 00 00 00 00 00 43218765:112 00000000 00 00 00 00 00 00 00 00 12345678:123 0CFFE000 00 00 00 00 00 00 00 00

Unfortuantely I have no idea how to handle constant data input. Would someone mind helping as I cannot find examples online either

Thanks

Jim


In reply to Perl and Can Bus by Jalcock501

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.