[wplug] Interesting question du jour
billings at negate.org
billings at negate.org
Mon Apr 21 16:51:33 EDT 2003
On Mon, 2003-04-21 at 16:36, billings at negate.org wrote:
> His solution is merely increasing the value of the last one, so if it's
> a character, the next character, if it's a number, it increases the
> number. It doesn't "know" about hexidecimal math.
Oops, I misread, Lance's perl does do the hex math, I was reading the
wrong source.
To avoid any instances of FF -> 100, I just did this:
perl -pe
's/((..:){5})(..)$/"$1$3\t$1".sprintf("%02X",(hex($3)+1)&255)/e;'
(basically the same as the last time, except I do a bitwise AND of 255
to only use the "important" lines.
--
Jonathan S Billings <billings at negate.org>
TSFNKP
More information about the wplug
mailing list