Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Subtract 2 hexadecimal numbers

by AlbinoSleestak (Initiate)
on Feb 21, 2014 at 22:17 UTC ( [id://1075786]=note: print w/replies, xml ) Need Help??


in reply to Subtract 2 hexadecimal numbers

I found how to do this on a basic level via PATH=$PATH:/usr/perl5/bin; perloc -h hex I found the hex function within "Perl In A Nutshell" Here's my contribution:
bash-3.00# vi 2hex "2hex" 12 lines, 191 characters #!/usr/bin/perl $deca=hex("0x175"); $decb=hex("0x1aa"); print "0x175 hex is $deca in decimal\n"; print "0x1aa hex is $decb in decimal\n"; $diff = $decb - $deca; print "the difference is $diff\n";
---end ---

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2026-04-13 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.