in reply to Subtract 2 hexadecimal numbers
use warnings; use strict; while (<DATA>) { if (/(\w+)=\w+ (\w+)=/) { my $diff = hex($2) - hex($1); printf "0x%x %d\n", $diff, $diff; } } __DATA__ 0x405d75=inst1 0x405d7a=inst2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Subtract 2 hexadecimal numbers
by samd (Novice) on Feb 20, 2014 at 23:19 UTC | |
by kcott (Archbishop) on Feb 21, 2014 at 08:18 UTC |