The string "A" isn't a number so none of the number or character expecting formats will do what you're apparently expecting (when converted to a number the numeric value is zero). Pass a number if you want to format a number (chr and/or ord will probably be of interest).
$ perl -E '$x = ord(q{A});printf( join( qq{\t}, qw( %c %x %d ) ) . qq{ +\n}, ($x)x3 )' A 41 65
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: printf x format ?
by Fletch
in thread printf x format ?
by pgmer6809
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |