in reply to vexed by the hex!

This seems to be a common stumbling block for C programmers. C has a "character" data type (several, actually) that is really an int in disguise. Perl does not. The automatic int-to-char conversions that happen in C do not happen in Perl.

Replies are listed 'Best First'.
Re^2: vexed by the hex!
by holandes777 (Scribe) on Jan 13, 2017 at 19:48 UTC

    so my understanding is:need to use ord() operator to convert it to something I want: if (ord($whatever) == 0x11), correct?

    Thanks much!

      ... if (ord($whatever) == 0x11), correct?

      Correct! (Although other solutions are, of course, possible.)


      Give a man a fish:  <%-{-{-{-<