I have a bunch of numbers represented as hexadecimal strings in log files that are being parsed by a Perl script, and I'm relatively inexperienced with Perl.
Some of these numbers are actually signed negative numbers, i.e. 0xFFFE == -2
when represented as a 16-bit signed integer.
Can somebody please tell me the canonical way of getting the signed representation of this number from the string FFFE
in Perl, or otherwise point me to a tutorial or other resource?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…