Trey Harris writes: : 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?
It's unlikely that {n,m} will still have that meaning in Perl 6. Maybe we'll have something like this: Perl 5 Perl 6 {1,3} <1..3> {3} <3> {3,} <3+> {0,3} <3-> Then again, maybe not... Larry