#!/usr/bin/env perl use strict; use warnings; use Unicode::UCD 'charprop'; for my $char (0, 1, ' ', 'a', "\n") { print "Char '$char'\n"; my $code_point = ord $char; print 'Numeric_Type: ', charprop($code_point, 'Numeric_Type'), "\n"; print 'Numeric_Value: ', charprop($code_point, 'Numeric_Value'), "\n"; print '-' x 40, "\n"; }