$_ = "0x030000\n"; s/0x([\da-f]+)/sprintf("%#.*x", length($1), hex($1) + 0x10000)/ei; print;