According to Synopsis 5, the repetition qualifier is now **{.} where the .
must correspond to either an Int or a Range.  This seems rather restrictive.
Why are we not allowed a junction of Ints, for instance 

            m/^ a**{1|3|5} $/ ; # Match 1,3, or 5 a's.

 

This does not seem noticeably more difficult than a range.  

Also, I don't know exactly what the syntax looks like, but I can imagine
using a repetition qualifier that takes a closure of some sort, for instance
to match an odd number of repetitions

 

m/^ a**{($_ % 2 == 0)} $/; #I'm not sure about the syntax for the code.

 

Joe Gottman


Reply via email to