Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

chr

Converts a Unicode code point number to the corresponding character.

Returns the character represented by the given code point. Negative values produce an empty string. Invalid Unicode code points (e.g. surrogates) produce the replacement character U+FFFD.

Synopsis

$char = chr(65);        # "A"
$char = chr(0x263A);    # "☺"

See Also

ord