in reply to Re^3: Perl hex substraction
in thread Perl hex substraction

Ok, without computer.
I have a sentence with numbers like (let's forget about hex):
50 40 30 12 8 4 2
I know this is some for of an encrypted message, and to get the message decoded every number must be substracted the next one from it:
50 - 40 = 10 40 - 30 = 10 30 - 12 = 18 12 - 8 = 4 8 - 4 = 4 4 - 2 = 2 2 - 0 = 2
So my result, my decoded sentence would be:
10 10 18 4 4 2 2

Replies are listed 'Best First'.
Re^5: Perl hex substraction
by Corion (Patriarch) on Feb 15, 2011 at 13:28 UTC

    Where do you have problems with implementing this (a bit modified) problem?

    Can you see a way to turn this modified problem into your original problem?

    A first step in solving the problem could be to get at the numbers from the string.