Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Subtract 2 hexadecimal numbers

by ww (Bishop)
on Feb 20, 2014 at 21:52 UTC ( #1075655=note: print w/ replies, xml ) Need Help??


in reply to Subtract 2 hexadecimal numbers

or, as a simplification & TIMTOWTDI:

perl -E "my $foo = (0x0f-0x0e); say $foo;" 1 perl -E "my $foo = (0x10f-0x0e); say $foo;" 257 perl -E "my $foo = (0x10f-0x01); say $foo;" 270

Where the remaining conversion is left as an exercise to the author of the ill-formatted, gimmé question which I have downvoted for laziness (of a non-Perlish character) and failure to read the directions on formatting.

This section of the Monastery is known as is "Seekers of Perl Wisdom" ...not "Spare me the need to think or to read documentation, tuts, etc." SMTNTTOTRD,T,E is a very unwieldy and ugly title... and not what this site is about.

In addition to following toolic's fine suggestion about honoring the local markup scheme, you may wish to read On asking for help and How do I post a question effectively?.


If you didn't program your executable by toggling in binary, it wasn't really programming!


Comment on Re: Subtract 2 hexadecimal numbers
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-09-23 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls