in reply to POSIX-Style character classes
fappy@flux[62] tmp > perl -e 'if( q{42} =~ /[:^digit:]/) {print "42 is + a digit\n"} else {print "42 is not a digit\n"}'; 42 is not a digit [download]
Now the questions remainns, what did you really want to test?