in reply to convert hex string to hex number

Use the hex() function to convert the string it to an integer. It even conveniently ignores the 0x prefix.

Replies are listed 'Best First'.
Re^2: convert hex string to hex number
by Narveson (Chaplain) on Jul 02, 2008 at 22:03 UTC

    Or since you know your string starts with 0x, you can eval it.

    my $hex = '0x3cb37140'; my $num = eval $hex; # 1018392896