chr Function in Perl

What is chr Function in Perl?

Explanation

chr Function:


This is used to get the ASCII value of the specified character.

Example :


#! C:programfilesperlbinperl
print "content-type: text/htmlnn";
print chr(41);
print "<br>";
print chr(35);
print "<br>";
print chr(43);
Result :

)
#
+

In the above Perl example the ASCII values of "41", "35", "43" is displayed as result.

Ask Questions

Ask Question