I've imported your subroutine into my code... However, I'm not getting the what I think I should. If I've got it right, your routine should return the unix time in epoch seconds. However, doing a "gdate '+%s'" on my system shows the epoch seconds = 1045700265... a bit different to what the routine returns (see below). In my case, perhaps the unpack format of the low_long and high_long paramenters in the routine require a little alteration? BTW, reversing the order of $high and $low into &quad_to_epoch didn't help...
print "$low $high ", &quad_to_epoch("$low $high"), "\n";
low high &quad_to_epoch 2038398976 10599419 408804118300 2238398976 10599419 408804118300 2438398976 10599419 408804118300 2638398976 10599419 408804118300 2838398976 10599419 408804118300 3038398976 10599419 408804118300 3238398976 10599419 408804118300 3438398976 10599419 408804118300 3638398976 10599419 408804118300
Regards, Stacy.

In reply to Re: Re: Re: Unpack for VMS binary files by maderman
in thread Unpack for VMS binary files by maderman

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.