Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Split int into segments of max int 26

by Anonymous Monk
on Sep 13, 2017 at 01:34 UTC ( #1199249=note: print w/replies, xml ) Need Help??

in reply to Split int into segments of max int 26

Pardon me for asking but why do you think that you need to "add 64" to an integer in order to translate it to ASCII?
  • Comment on Re: Split int into segments of max int 26

Replies are listed 'Best First'.
Re^2: Split int into segments of max int 26
by thanos1983 (Priest) on Sep 13, 2017 at 07:47 UTC

    Hello Anonymous Monk,

    The reason is simple, read the ASCII Table and Description on the Decimal column you will see (Dec 65 = A) but when you read the int are coming as 1 so you need to add 64 to get the character. You can also read the chr function it contains the same example.

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199249]
LanX .oO( cemetery breweries ? )

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-12-15 11:11 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (431 votes). Check out past polls.