in reply to Re: Validating Hex Numbers
in thread Validating Hex Numbers
Of course, in computing contexts single-hex-digit numbers are unusual, but the poster didn't specify what the source or destination of this data is, so I wouldn't want to build in that assumption without additional information.
One thing that the post implies but doesn't make explicit is that "number" really means "non-negative integer". If you want to be truly comprehensive, something like -A8F.C is a valid hex number (namely -2073.75 decimal), but not something most of us likely encounter on a regular basis.
$perlmonks{seattlejohn} = 'John Clyman';
|
|---|