hex file

Discussion in 'Perl Misc' started by lily12a@gmail.com, Jul 20, 2006.

  1. Guest

    Hello,

    Please help if anyone knows. I would highly appreciate it. This is my
    question.

    Input array will include values: 4C, 49, 4C, 59
    How to assign these values in to an array of hex value.

    Thanks,
    , Jul 20, 2006
    #1
    1. Advertising

  2. David Squire Guest

    wrote:
    > Hello,
    >
    > Please help if anyone knows. I would highly appreciate it. This is my
    > question.
    >
    > Input array will include values: 4C, 49, 4C, 59
    > How to assign these values in to an array of hex value.
    >


    What have you tried?
    David Squire, Jul 20, 2006
    #2
    1. Advertising

  3. Guest

    , Jul 20, 2006
    #3
  4. Dave Weaver Guest

    <> wrote:
    >
    > Please help if anyone knows. I would highly appreciate it. This is my
    > question.
    >
    > Input array will include values: 4C, 49, 4C, 59
    > How to assign these values in to an array of hex value.


    Those are already hex values!

    Your question is too vague - please see the posting guidelines that
    are posted to this group regularly.

    Perhaps you mean something like this:

    my @input_array = qw(4C 49 4C 59);
    my @values = map { hex $_ } @input_array;

    But perhaps not. Your question needs to be clearer.
    Dave Weaver, Jul 21, 2006
    #4
  5. Dave Weaver <> wrote:
    > <> wrote:



    >> Input array will include values: 4C, 49, 4C, 59
    >> How to assign these values in to an array of hex value.

    >
    > Those are already hex values!



    They cannot be hex values, because there is no such thing as a hex value.

    The abstract concept of a "number" is difficult for us humans to
    discuss, so we have come up with a number of different *representations*
    (numeral systems) for talking about any particular number.

    1010 # 2
    12 # 8
    10 # 10
    A # 16

    Those are all _different_ representations for the _same_ number.

    So

    Those are already represented in hex!

    would have been a more accurate rejoinder. :)


    [ snip code that converts base-16 to base-10 ]


    > Your question is too vague



    Right. I'm sure you know all of the above, but I hope that it will
    help the OP compose an answerable question.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 21, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    6,192
    Neredbojias
    Aug 19, 2005
  2. Bengt Richter
    Replies:
    6
    Views:
    467
    Juha Autero
    Aug 19, 2003
  3. jack
    Replies:
    4
    Views:
    586
  4. tim

    hex string to hex value

    tim, Nov 22, 2005, in forum: Python
    Replies:
    8
    Views:
    18,853
  5. tim
    Replies:
    2
    Views:
    1,561
    Dennis Lee Bieber
    Nov 23, 2005
Loading...

Share This Page