in reply to Regex for weird characters

If what you want to allow is all printable ASCII characters, you can use regex character classes to specify that a string containing any non-ASCII characters or control characters is "funny":
print "funny" if ($c =~ /[[:^ascii:][:cntrl:]]/);
This is equivalent to checking that no character has an integer value less than or equal to 31 (1f hex), or greater than or equal to 127 (7f hex):
print "funny" if ($c =~ /[\x00-\x1f\x7f-\xff]/s);

See perlre(1) for more details.

Both of these solutions disallow newlines and tabs; you can allow them with the [:isspace:] character class.