in reply to Multiply Hex values
Don't reduce them to "decimal", convert them to numbers (hex), multiply them and convert back to hexadecimal representation (sprintf):
perl -wle "print sprintf '%08x', hex(shift)*hex(shift)" 12340f 33
Thank you very much. It seems that you were the only one who understood my problem. The strings are by default in hex (they are not numbers generated by me and then placed in hex format). Cheers.
How is what you are doing any different than what he said he didn't want to do? :)
The OP wants to "convert to decimal" representation, which is the wrong terminology IMO.
Thinking about numbers in terms of their representational basis is wrong - just because print converts numbers to their representation in decimal, that doesn't mean they are still numbers ;)
www.com | www.net | www.org
No recent polls found