You could use the POSIX [:print:] character class. Or, rather, its inverse.
if ($string =~ /[^[:print:]]/) { print "Found unprintable characters\n"; }
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Testing for unprintable characters
by davorg
in thread Testing for unprintable characters
by Moron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |