|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Re: Re: Re: Re: Converting Hex to Float (and vise versa) (overly simple)by BrowserUk (Patriarch) |
| on Feb 08, 2004 at 02:18 UTC ( [id://327432]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
The reason has nothing to do with pack or unpack, it is the same reason that printing a hex constant doesn't print exactly what you see.
Perl automatically converts hex values (as indicated by 0x...) to it internal (binary) representation when parsing the source code. It becomes just another perl number. Whenever perl prints out a number, it prints the ascii representation of it's decimal value, unless you specifically state that you want it printed in some other form. Ie. using printf or sprintf or similar. Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"Think for yourself!" - Abigail Timing (and a little luck) are everything!
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||