Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??

ASCII!! That didn't even occur to me as this portion of the function is entirely numeric. I suspect that the way this was implemented in the original script was incorrectly understood. Thank you for the clarification. One additional question, if I could...

Since it returns only a portion of the result, I attempted to modify the snippet a little bit, but it still produced the same result. See below.

my $input = 0x916CD; #595661 my @unpacked = unpack "VV", $input; print(join ", ", @unpacked); >>909457717 #0x36353935

From your reply, I was expecting to have the following.

Dec: 825_636_405, 14_645 Hex: 0x31363635, 0x3935

Could you help me understand why this doesn't unpack into the array like I thought it would? Thanks for the help!

In reply to Re^2: Understanding Unpack on Decimal Value by arblargan
in thread Understanding Unpack on Decimal Value by arblargan

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.