use warnings; use strict; use open qw/:std :utf8/; print "+", "-Dec-Hex-Oct----+"x4, "\n"; for my $y (0..0x1F) { print "|"; for my $c (map {$y|$_} 0x00,0x20,0x40,0x60) { printf " %3d %02X %03o %s |", $c, $c, $c, chr( $c<0x21 ? 0x2400+$c : $c==0x7F ? 0x2421 : $c ); } print "\n"; } print "+", (("-"x16)."+")x4, "\n"; #### use warnings; use strict; # iconv -f UTF-8 utf8.txt -t Latin9 -o latin9.txt my ($ifile, $ienc) = ("utf8.txt", "UTF-8"); my ($ofile, $oenc) = ("latin9.txt", "Latin9"); open my $ifh, "<:raw:encoding($ienc)", $ifile or die "$ifile: $!"; open my $ofh, ">:raw:encoding($oenc)", $ofile or die "$ofile: $!"; print $ofh do { local $/; <$ifh> }; close $ifh; close $ofh;