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
In reply to Re: Subtract 2 hexadecimal numbers
by toolic
in thread Subtract 2 hexadecimal numbers
by samd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |