note
Laurent_R
There is a wrong understanding in your post.
<p>
Numbers exist independently of their (hexadecimal, decimal or other) representations.
<p>
From Perldoc: [doc://hex] interprets EXPR as a hex string and returns the corresponding value.
<p>
The hex function <i>converts a string into a number</i>, it does not convert an hex number into a decimal number (even though if you print the output of <c>hex</c>, it will be printed as a decimal number, this does not imply that they're stored as decimal numbers, as this is irrelevant, they are stored as numbers).
<p>
Now, if you want to multiply numbers, they have some how to be numbers. So you need <i>to convert your strings into numbers</i> (not decimal or hexadecimal numbers), or at least something that Perl understands as numbers. So converting your hexadecimal strings to numbers is the right way to do it. And, once you've done that, you can multiply your numbers, and then print out the resulting number <i>value</i> in any representation you wish, including hexadecimal representation or any other one.
1181504
1181504