in reply to Re^2: pattern matching
in thread pattern matching

Premature generalisation is the root of much evil.

In practice, since the OP did not mention any character-set complications, it is a reasonable assumption that the task in question does not require matching non-ASCII capital letters or require excluding non-ASCII numerals. So there is no need to worry about Unicode ranges, and distinguishing between \d and [0-9] is splitting hairs.

Replies are listed 'Best First'.
Re^4: pattern matching
by JavaFan (Canon) on Apr 10, 2009 at 13:49 UTC
    In this age and time, and the fact that Perl has escaped outside of the US border, not assuming someone means "ASCII" when talking about letters or digits isn't "premature generalisation". It's not that [A-Z] is such a savings on keystrokes over \p{Lu}.

    At least you could have mentioned your odd choice (assuming you actually thought about any "character-set complications").