#!/usr/bin/perl -C use utf8; use Getopt::Std; getopts("w:s:e:c:h"); usage() if $opt_h; $start = 0x2600; $end = 0x2700; $width = 40; $start = num($opt_s) if defined $opt_s; $end = num($opt_e) if defined $opt_e; $width = $opt_w if defined $opt_w; if( defined $opt_c ){ $start = num($opt_c); $end = num($opt_c); } $cnt = 0; print STDERR "printing all unicode characters from $start to $end\n"; for( $start .. $end ){ $cnt = ($cnt + 1) % $width; $ch = pack "U", $_; print $ch; print "\n" if $cnt == 0; } print "\n"; sub num{ my ($n) = @_; return $n =~ /^0x/ ? hex $n : $n; } sub usage{ die< USAGE }