use Test::More; ok( 1 =~ m/\p{Nd}/ ); ok( 1 =~ m/^-?\p{Nd}/ ); ok( 1 =~ m/-?\p{Nd}+/ ); ok( 1 =~ m/-?\p{Nd}/ ); ok( 1 =~ m/-*\p{Nd}/ ); ok( 1 =~ m/x?\p{Nd}/ ); ok( 1 =~ m/x?y?\p{Nd}/ ); done_testing(); __END__ ok 1 ok 2 ok 3 not ok 4 # Failed test at ./t.pl line 16. not ok 5 # Failed test at ./t.pl line 17. not ok 6 # Failed test at ./t.pl line 18. not ok 7 # Failed test at ./t.pl line 19. 1..7 # Looks like you failed 4 tests of 7.