1. Computing

Perl chr() & ord() functions - Quick Tutorial

How to use the chr() & ord() functions

From , former About.com Guide

 chr(NUMBER);
 ord(CHARACTER); 
Perl's chr() and ord() functions are used to convert characters into their ASCII or Unicode values (and vice versa). chr() takes an ASCII or Unicode value and returns the equivalent character, and ord() performs the reverse operation by converting a character to it's ASCII or Unicode value.
 print chr(65);
 print "\n";
 print ord('A');
 print "\n"; 
For more information on encoding, try some of these links:

  1. About ASCII
  2. ASCII Character Code Reference
  3. Perl Encoding with the Encode Module

©2013 About.com. All rights reserved.