in reply to Re: convert hex string to hex number
in thread convert hex string to hex number

There isn't such a thing as a "hex number" in Perl.

Then how do you explain this ...

perl -le "print 0x10 + 1" 17

Replies are listed 'Best First'.
Re^3: convert hex string to hex number
by shmem (Chancellor) on Jul 03, 2008 at 11:23 UTC

    With perldata. Search for "Scalar value constructors". Your 0x10 is a numeric literal.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}