This tests if $h doesn't contain any characters it shouldn't contain, and additionally, if there are any characters at all.length $h && $h !~ tr/0-9A-Fa-f//c;
In reply to Re: Validating Hex Numbers
by bart
in thread Validating Hex Numbers
by HiFoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |