>>>>> "Thiago" == Thiago Nascimento < nascimenthiago%40gmail.com">nascimenthiago
gmail.com> writes:
Thiago> my $char = '(c)';
Thiago> my $decval = ord $char;
That's not really "decimal". It's just a "number" internally, without a
numeric base. Well, technically, it's represented in IEEE Floating Point, but
you probably don't care about that. The only time it becomes "decimal" is
when it gets printed, where it is sent automatically through "number to
decimal" conversions.
Thiago> my $hexval = sprintf("%x", $decval);
So this is a "number to hex" conversion, not a decimal to hex conversion.
Just trying to get the terminology nailed down, because misstating it
at this level can lead to bizarre conclusions.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
< merlyn%40stonehenge.com">merlyn
stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
.