ord returns the number associated with the EXPRESSION. If EXPRESSION is an empty string, the function returns 0. Without NUMBER, the contents of $_ are used.
ord is the reverse of chr.
$character = 'A';
say "character = '" . $character, "' corresponds to the value of " . ord $character;
number = 65 corresponds to the code 'A'
character = 'A' corresponds to the value of 65