Convert::ASCIInames 1.002 review

Download
by rbytes.net on

Convert::ASCIInames is a Perl module that includes ASCII names for control characters. SYNOPSIS use Convert::ASCIInames; C

License: Perl Artistic License
File size: 11K
Developer: Ken Coar
0 stars award from rbytes.net

Convert::ASCIInames is a Perl module that includes ASCII names for control characters.

SYNOPSIS

use Convert::ASCIInames;

Convert::ASCIInames::Configure(fallthrough => 1);
$name = ASCIIname($character_ordinal);
$name = ASCIIaltname($character_ordinal);
$name = ASCIIdescription($character_ordinal);
$name = ASCIIaltdescription($character_ordinal);
$character_ordinal = ASCIIordinal($name);

Most if not all of the non-printing characters of the ASCII character set had special significance in the days of teletypes and paper tapes. For example, the character code 0x00 would be sent repeatedly in order to give the receiving end a chance to catch up; it signified "no action" and so was named NUL. The sending end might follow each line of text with a number of NUL bytes in order to give the receiving end a chance to return its print carriage to the left margin.

The control characters (so-called because they were used to control aspects of communication or receiving devices) were given short 2-to-4 letter names, like CR, EOT, ACK, and NAK.

Some of these special purposes have become obsolete, but some of them are still in use. For example, character 0x07 (BEL) is used to ring the feeper; 0x05 (ENQ) is recognised by many terminals as a trigger to report their status; and 0x08 (BS) still means "move the cursor back one space".

This module will return the ASCII name for specified characters, or the character code if given an ASCII name. In addition, the full descriptive name ("Start of Heading" instead of SOH) is available, although reverse translation of the descriptions isn't provided.

Some control characters have altername names. Character 0x13 is named DC3 ("Device Control 3"), but is probably better known by its alternate name of XOFF. These alternate names are also available through this module's functions.

Requirements:
Perl

Convert::ASCIInames 1.002 search tags