One of the little bugaboos that got me a lot my first N years of doing
Perl was that {m,} is a quantifier meaning "m or more", but {,n} is *not*
a quantifier meaning "up to n".  People like symmetry, and it seems
logical that {,n} would DWIM, but it doesn't.  I still make the mistake on
occassion.

I can only think of one reason to disallow it (unless there's a parsing
issue somewhere that I can't immediately see): some people might expect
DWIM behavior to be implicit M=0, and others might expect M=1.  But I
honestly don't see that as compelling--if you read {m,} as "m or more",
and {,n} as "n or less", then I think M should clearly default to 0.

Is there something I'm missing here?  If not, why not add some DWIMiness
and make {,n} work?

Trey
-- 
Trey Harris
Secretary and Executive
SAGE -- The System Administrators Guild (www.sage.org)
Opinions above are not necessarily those of SAGE.


Reply via email to