Syntax

chr EXPR
chr


Definition and Usage

Returns the character represented by the numeric value of EXPR, or $_ if omitted, according to the current character set. Note that the character number will use the Unicode character numbers for numerical values above 127.

Return Value

  • Returns the Character corresponding to the numeric value of EXPR.

Example

#!/usr/bin/perl

print chr (35);
print "n";
print chr (38);
print "n";
print chr (40);

It will produce following result
#
&
(
NOTE: You might be interested in ASCII Code Lookup Table.

What Do You Think on This ? Say Here

This site uses Akismet to reduce spam. Learn how your comment data is processed.