Please read Writeup formatting tips. Particularly, please wrap your code samples in 'code tags' thus:
<code> ## Your code goes here </code>
Your example will then display as:
#!/fs/COTS/gnu/bin/AIX/perl $raw = pack 'H*', '00000034000031b110191403b8811bb1366e4'; print for reverse unpack 'dCCVV', reverse $raw
Now, the reason you are not getting the same results is because no linefeeds are being produced, so all the numbers are being abutted. There are three ways to fix that problem.
#!/fs/COTS/gnu/bin/AIX/perl $raw = pack 'H*', '00000034000031b110191403b8811bb1366e4'; print $_, "\n" for reverse unpack 'dCCVV', reverse $raw
#!/fs/COTS/gnu/bin/AIX/perl -l $raw = pack 'H*', '00000034000031b110191403b8811bb1366e4'; print for reverse unpack 'dCCVV', reverse $raw
#!/fs/COTS/gnu/bin/AIX/perl $raw = pack 'H*', '00000034000031b110191403b8811bb1366e4'; say for reverse unpack 'dCCVV', reverse $raw
BTW: Stupid as it is, some people will get upset with you if you continue to write "PERL". You should use 'Perl' or 'perl' (the first to indicate the language, the second to indicate the interpreter (load module)) in order to avoid that.
In reply to Re^5: HEX to floating point
by BrowserUk
in thread HEX to floating point
by Spooky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |