I tried using n2 on the basis that the field is supposed to be twice as long

'N' is a unsigned 32-bit (4 byte) value using the same byte ordering as 'n'

'Q>' is a unsigned 64-bit (8 byte) value using the same byte ordering as 'n'

From the info you gave us, you want

unpack 'a a n N Q> a*'
which can also be written as
unpack 'a a S> L> Q> a*'

That said,

I know from the output of the other program that the ClOrdID in this message is "4295075805"

The long string you gave for ClOrdID translates to 04C6A29EBAD1E5BB(base16).

You're expecting 4295075805(10) = 000000010001A7DD(16)

No matter how you rearrange the hex digit pairs, those will never match. It's clearly not a byte ordering problem.


In reply to Re: Lost in unpack hell by ikegami
in thread Lost in unpack hell by stevehicks

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.