Problems? Is your data what you think it is? | |
PerlMonks |
Re: printf x format ?by ikegami (Patriarch) |
on Mar 03, 2022 at 07:19 UTC ( [id://11141773]=note: print w/replies, xml ) | Need Help?? |
'A' produces a string. The same string as "A". The formats largely control how numbers are converted to strings for printing. Strings are already strings, so only one format is needed for them (%s). %c applies chr to a number, %x produces a hex representation of a number, and %d produces a decimal representation of a number. You probably wanted to pass ord('A') aka 0x41 aka 65.
In Section
Seekers of Perl Wisdom
|
|