On Wednesday, May 15, 2002, at 01:02 , John W. Krahn wrote: > Felix Geerinckx wrote: >> on Wed, 15 May 2002 03:12:15 GMT, [EMAIL PROTECTED] (Drieux) wrote: [..] >>> if ( $val =~ /^\d+/ and $val > 0 and $val <11) { >> >> Not good enough. >> >> $val = 3.141592654; >> >> is perfectly numeric but fails your /^\d+/.
john - I think he was actually referring to the URL one where I had used the tighter standard RegEx: /^\d+$/ and clearly his feverish brow rushed to type, and mistyped just a bit.... > No it doesn't > > $ perl -le' > $val = 3.141592654; > if ( $val =~ /^\d+/ and $val > 0 and $val <11) { > print "True" } > else { > print "False" } > ' > True <WayKamp voice=SouthernBelle mince=TRUE curtsey=deep fan=LargePeeCock > how galant - to try to rescue me from that BRUTE! but only technically correct. since if you set $val = "3.145BOB"; you will notice that this would slide through as true. but would be considered as FALSE as 3.14 if ( $val =~ /^\d+$/ and $val > 0 and $val <11) { so the shift to using the is_numeric() as that really really brutish cad suggested..... </WayKamp> ciao drieux --- Do Not Try This At Home BOYS and Girls. These are Professional Drag Queens using Very Very Very Special safety equipment.... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]