On Wednesday, May 15, 2002, at 02:55 , Felix Geerinckx wrote:
> on Wed, 15 May 2002 03:12:15 GMT, [EMAIL PROTECTED] (Drieux) wrote:
>>
>> so you could do it with say
>>
>>
>> if ( $val =~ /^\d+/ and $val > 0 and $val <11) {
>
> Not good enough.
>
> $val = 3.141592654;
>
> is perfectly numeric but fails your /^\d+/.
hence
if ( is_numeric($val) and $val > 0 and $val <11) {
.....
http://www.wetware.com/drieux/pbl/perlTrick/RangeCheckForNumerics.txt
there is NO pleasing some people.....
ciao
drieux
---
and with that he went off in a huf,
and for the right dollar figures we can buy you a huf II.....
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]