in reply to Re^3: HEX to floating point
in thread HEX to floating point

Thanks so much - it work's great! One other question: what would be the best way to assign each value to a variable name? Again, thanks for your help - I'm definitely sold on PERL even though I'm a novice.

Replies are listed 'Best First'.
Re^5: HEX to floating point
by almut (Canon) on Jun 16, 2008 at 18:20 UTC
    what would be the best way to assign each value to a variable name?

    Something like this, for example:

    my ($long1, $long2, $byte1, $byte2, $double) = unpack 'NNCCd', $raw;

    (of course, choose names as you see fit...)

Re^5: HEX to floating point
by FunkyMonk (Bishop) on Jun 16, 2008 at 22:37 UTC
    Your next lesson is to understand that it's Perl (the language) or perl (the interpreter) but never PERL.

    Yes, we are picky about such things:)


    Unless I state otherwise, all my code runs with strict and warnings
      Whatever you say - you're the Monk! ...any suggestions on good Perl books?