Also the character class needs to be negated to search for characters not in the range and then the result negated (here with !~ instead of =~), otherwise he will only detect if the string has any asccii chars
$string !~ m/[^\x00-\x7f]/
In reply to Re^2: How to determine if string contains non-ASCII characters ?
by jethro
in thread How to determine if string contains non-ASCII characters ?
by roadrunner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |