The number returned ord may not be an ASCII code.
When passed a string of characters, ord will return the UNICODE character number of the first character in the string. (For the 128 ASCII characters, the UNICODE character number and the ASCII character number are the same.)
When passed a string of encoded characters, ord may return a useless value.
When passed a string of packed bytes, ord will return the value of the first byte.
The same pretty much applies to C's printf too.
In reply to Re: Getting the ascii number through perl's printf
by ikegami
in thread Getting the ascii number through perl's printf
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |