Spooky has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
This is my first PERL question and probably won't be my last! I have a binary file and when I access it with emacs using the "hexl-mode" option I'm presented with the following:
0000 0034 0000 31b1 0191 403b 8811 bb13 66e4
formatted as 4bytes 4bytes 1byte 1byte 8bytes
which translates into the following numbers:
52 12721 1 145 27.53152055
I need a way to convert the hex values into either
integer or floating point using PERL - any suggestions?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HEX to floating point
by almut (Canon) on Jun 16, 2008 at 13:14 UTC | |
Re: HEX to floating point
by BrowserUk (Patriarch) on Jun 16, 2008 at 13:47 UTC | |
by Spooky (Beadle) on Jun 16, 2008 at 14:47 UTC | |
by almut (Canon) on Jun 16, 2008 at 17:50 UTC | |
by Spooky (Beadle) on Jun 16, 2008 at 18:12 UTC | |
by almut (Canon) on Jun 16, 2008 at 18:20 UTC | |
by FunkyMonk (Chancellor) on Jun 16, 2008 at 22:37 UTC | |
| |
by BrowserUk (Patriarch) on Jun 16, 2008 at 14:57 UTC | |
by Spooky (Beadle) on Jun 16, 2008 at 15:39 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2008 at 15:58 UTC | |
| |
Re: HEX to floating point
by tachyon-II (Chaplain) on Jun 16, 2008 at 14:13 UTC | |
by Your Mother (Archbishop) on Jun 16, 2008 at 17:33 UTC | |
by tachyon-II (Chaplain) on Jun 16, 2008 at 23:31 UTC | |
Re: HEX to floating point
by moritz (Cardinal) on Jun 16, 2008 at 12:29 UTC | |
Re: HEX to floating point
by kabeldag (Hermit) on Jun 16, 2008 at 12:01 UTC | |
Re: HEX to floating point
by syphilis (Archbishop) on Jun 16, 2008 at 12:18 UTC |
Back to
Seekers of Perl Wisdom