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

Re: Hex Question(s)

by nikosv (Chaplain)
on Mar 28, 2008 at 06:55 UTC ( #676923=note: print w/replies, xml ) Need Help??


in reply to Hex Question(s)

the oct function converts a string into a number. prepend 0x to your string an pass it through the oct function
print 0x1234+0x4321;#prints 21845 print '0x1234'+'0x4321';#prints 0 print oct('0x1234')+oct('0x4321); #prints 21845 or $a='0x1234'; $b='0x4321'; print oct($a)+oct($b);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2020-02-22 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (98 votes). Check out past polls.

    Notices?