in reply to Re: Checking whether a value is numeric or notin thread Checking whether a value is numeric or not
For this particular case, I would probably use:
if($blk =~ /\D/) { print "Invalid value";} [download]
For some reason, it seems clearer to me.