2008/4/3 Jay Savage <[EMAIL PROTECTED]>:
snip
>  Exactly. The functionality is there to be taken advantage of. I don't
>  see why that is "unfortunate" at all. How is "Mongolian digit three"
>  less of a digit than arabic numeral three? That \d is unicode-aware
>  is, IMO, it's strongest selling point over a simple roll-your-own
>  character class. \d finds digits; [0-9] finds arabic numerals.
>
>  As for what one expects...that's a different story.
snip

Well, that depends on what you want to do with the data.  Generally, I
pull a number out of a string because I want to do math with it, but
Perl only does math with characters "0" .. "9", other characters get
turned into 0.  This has made \d next to useless for me as I am
looking for a number and it can return a string.  The other problem is
that for years people have been saying "don't use [0-9], use \d
instead", so now we have to say just as loudly and often "Only use \d
if you mean any UNICODE character that is marked as a digit and use
[0-9] when you want to do math on the result" (which is what I am
doing).

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to