samd has asked for the wisdom of the Perl Monks concerning the following question:
consider a text file consisting of hexadecimal entries as shown below.
0x405d75=inst1 0x405d7a=inst2 0x4035f7=inst1 0x4035f8=inst2 0x4035f8=inst1 0x4035fb=inst2 0x4035fb=inst1 0x4035fc=inst2 0x4035fc=inst1 0x4035fd=inst2 0x405d7a=inst1 0x405d81=inst2 . . . . .
how do i subtract (inst2-inst1) and diplay the difference in hexadecimal and also in integer value in perl.
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Subtract 2 hexadecimal numbers
by toolic (Bishop) on Feb 20, 2014 at 20:54 UTC | |
by samd (Novice) on Feb 20, 2014 at 23:19 UTC | |
by kcott (Archbishop) on Feb 21, 2014 at 08:18 UTC | |
|
Re: Subtract 2 hexadecimal numbers
by ww (Archbishop) on Feb 20, 2014 at 21:52 UTC | |
|
Re: Subtract 2 hexadecimal numbers
by Bloodnok (Vicar) on Feb 21, 2014 at 12:10 UTC | |
|
Re: Subtract 2 hexadecimal numbers
by locked_user sundialsvc4 (Abbot) on Feb 21, 2014 at 15:07 UTC | |
|
Re: Subtract 2 hexadecimal numbers
by dwm042 (Priest) on Feb 21, 2014 at 20:11 UTC | |
|
Re: Subtract 2 hexadecimal numbers
by AlbinoSleestak (Initiate) on Feb 21, 2014 at 22:17 UTC |