strfry() has asked for the wisdom of the Perl Monks concerning the following question:

like a function that returns the ascii numberic when given a char as an argument?

Originally posted as a Categorized Question.

  • Comment on is there an opposite to the chr function?

Replies are listed 'Best First'.
Re: is there an opposite to the chr function?
by Ovid (Cardinal) on May 24, 2001 at 23:49 UTC

    "perldoc -f chr" will give you documentation for chr (as will clicking that link). The docs say (wording seems to differ amongst versions):

    For the reverse, use ord.

    Originally posted as a Categorized Answer.

Re: is there an opposite to the chr function?
by myocom (Deacon) on May 24, 2001 at 22:15 UTC

    Yes. See ord.

    Originally posted as a Categorized Answer.