# Header from Unicode articles use utf8; use v5.12; use strict; use warnings; use warnings qw(FATAL utf8); use open qw(:std :utf8); use charnames qw(:full :short); $| = 1; my $format_string = qq{%2s %6d %6x %24b %3x %3x %8b %8b\n}; foreach my $i ( 0x0000 .. 0xD799, 0xE000 .. 0xFFFF ) { my @p; { my $j = $i; while ( $j ) { # print $j; push @p, $j & 0xFF; $j >>= 8; } @p = reverse @p; while ( scalar @p < 2 ) { unshift @p, 0; } } eval { print sprintf $format_string, chr($i), $i, $i, $i, @p, @p; } or print $!, qq{\n}; }