Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: vexed by the hex!

by Anonymous Monk
on Jan 13, 2017 at 19:09 UTC ( #1179540=note: print w/replies, xml ) Need Help??

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 (Beadle) 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:  <%-{-{-{-<

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1179540]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2019-11-20 06:36 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (96 votes). Check out past polls.