if ($line =~ m/([\0-\x8\xb-\x1f\x7e-\xff])/) { print "$line contains illegal character (ord: ", ord($1), ")\n"; }