chr()
converts a number into a character, ord()
does the opposite:
$string = chr(65) . chr(66) . chr(67); # "ABC" $i = ord('A'); # 65
The conversion of multiple characters can also be done with pack( "C*", @list)
.
my @list = ( 65, 66, 67); print pack( "C*", @list) . "\n"; # --> "ABC\n"