Search notes:

Perl function: chr

chr creates a character from a Unicode codepoint.
#!/usr/bin/perl
use warnings;
use strict;

#
# We're going to print utf 8 characters,
# not ascii characters:
#
binmode STDOUT, ':utf8';

#
#   Make sure chr(…) returns a utf8 rather
#   than a ascii character:
#
use 5.014;

for my $x (0 .. 15) {
  for my $y (0 .. 15) {

    my $c = chr($x * 16 + $y);

    if ($c =~ /\w/) {
      print "  $c";
    }
    else {
      print "  .";
    }

  }
  print "\n";
}
Github repository about-perl, path: /functions/chr.pl
The reverse function of chr is ord.

See also

Perl functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758193861, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/functions/chr(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78