From: Mark Probert Date: 2002-01-22T06:50:27+09:00 Subject: converting chars to numeric Hi. I am new to ruby and coming from a Perl environment. Can someone tell me if there is a nice way to do the following: s = "4567" a = s[0] # --> I want the value '4' not '54', the ASCII value of 4 b = s[1] # --> 5 a + b # --> 9 I can do this by saying a = s[0] - 48 though this seems a might ugly for ruby :-). TIA, -mark.