From: Pierre-Charles David Date: 2001-07-11T23:58:49+09:00 Subject: [ruby-talk:17654] Re: Ruby equivalent for ord() in Perl Chris Uzdavinis wrote: > Yuri Leikind writes: > > >>Can't find the equivalent of Perl ord() in >>Ruby. There's chr(), though. >> >>It's probably in front of my eyes, but ... >> > > Perl: > ord('c') # ==> 99 > > Ruby: > ?c # ==> 99 This works only for litterals, whereas 'c'[0] also works with variables : aString[0]. -- Pierre-Charles David (pcdavid emn fr) DEA Informatique, �cole des Mines de Nantes, France