Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Re: Hex to decimal

by merlyn (Sage)
on Apr 26, 2001 at 01:46 UTC ( [id://75634]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Hex to decimal
in thread Hex to decimal

You can skip the hex step with:
perl -e 'print unpack "s", pack "H*", "ffaa"'
If that's wrong on your system, it's an endian problem. {grin} So you can also try:
print unpack "s", pack "h*", scalar reverse "ffaa";
which does print -86 on my machine.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://75634]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found