| Hi, Assuming your string is in $str, try this: if ($str =~ /^!-~\s/g){print "Non-ASCII character found"} This will check for any other character apart from ASCII character. |
In reply to Re^2: testing if a string is ascii
by earlati2
in thread testing if a string is ascii
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |