For this particular case, I would probably use:
if($blk =~ /\D/) { print "Invalid value";}
For some reason, it seems clearer to me.
In reply to Re^2: Checking whether a value is numeric or not
by gwadej
in thread Checking whether a value is numeric or not
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |